'Warning: The action "view" is not available.' on form submission when no workflow actions are available
|Reported by:||Owned by:|
- Set up a trac environment with
[ticket] workflow = ConfigurableTicketWorkflow
- Remove the contents of the
- Define a ticket workflow that can leave tickets stranded in a certain state. A trivial example would be one that doesn't provide any way out of the "new" state, e.g. a one-line
[ticket-workflow] accept = assigned -> accepted.
- Through the web UI, submit a new ticket and (if necessary) transition it into the stranded state.
When viewing the ticket with TICKET_MODIFY or higher permissions, you will now see the full ticket modify form and comment form, and an empty "Action" fieldset. If you try to submit the form, the submission will be rejected with the following warning:
Warning: The action "view" is not available.
This happens because the form was submitted with no "action" parameter.
ConfigurableTicketWorkflow is able to reset tickets back into a valid state if they are in a state that doesn't exist, but this is a different situation — the state is valid, but there's no way out of it, and no way to even remain in the current state while leaving a comment or modifying the ticket properties.
Probably one of the following should occur:
- Perhaps the
ConfigurableTicketWorkflowshould detect that the ticket is stranded, and inject a "* → *" action so that the ticket's properties can be edited and comments can be submitted.
- Perhaps the web_ui should detect that no workflow actions are available, and disable the "Modify Ticket" and "Comment" forms altogether, with a warning or explanation saying that an administrator should be contacted to fix the ticket workflow.
- At minimum, the current behavior could be retained, but with a more helpful error message when the form is submitted, like: "Warning: no workflow actions are available for this ticket. This may be an error in your Trac [ticket-workflow] configuration. Contact an administrator of your Trac site for help."