Opened 11 years ago
Closed 11 years ago
#11476 closed defect (duplicate)
'Warning: The action "view" is not available.' on form submission when no workflow actions are available
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | ticket system | Version: | |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
To reproduce:
- Set up a trac environment with
[ticket] workflow = ConfigurableTicketWorkflow
- Remove the contents of the
[workflow]
section - 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.
The 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
ConfigurableTicketWorkflow
should 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."
As usual I couldn't find an existing ticket before filing this, but found one very soon afterwards. :-/ I think this is a duplicate of #9510.