Edgewall Software
Modify

Opened 15 years ago

Closed 14 years ago

Last modified 14 years ago

#8235 closed defect (fixed)

Submitting a workflow state after another user has set it results in an error.

Reported by: verm Owned by: Eli Carter
Priority: normal Milestone: 0.12
Component: ticket system Version: devel
Severity: normal Keywords: workflow
Cc: kirean@…, osimons Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I was trying to reopen a ticket when i got the error:

Invalid action "reopen"

Turns out when I opened the page, someone else had already set the status to reopened. This is the error I got when I tried to submit my request.

The error message should either be removed and do the right thing or be more informative ie. "someone else has already set the ticket status to XXX"

Attachments (2)

ticket-8235-fix-attempt2.patch (4.0 KB ) - added by Eli Carter 14 years ago.
possible fix (attempt 2)
8235-invalid-action-r9363.patch (3.3 KB ) - added by Remy Blank 14 years ago.
Simpler fix.

Download all attachments as: .zip

Change History (14)

comment:1 by Christian Boos, 15 years ago

Which version of Trac were you using?

comment:2 by anonymous, 15 years ago

I'm using r8127.

comment:3 by akovalenko, 15 years ago

I'm using version 0.11.2 and experience same problem. I'm trying to reopen an existing ticket, but unable to do so, because of a strange error message

Invalid action "reopen"

comment:4 by Erik Andersson <kirean@…>, 15 years ago

I've also encountered the same situation. Two people opened up a ticket. One changed the status and the other tried later to use an action that wasn't allowed in that new state.

comment:5 by Erik Andersson <kirean@…>, 15 years ago

Cc: kirean@… added

comment:6 by Christian Boos, 15 years ago

Keywords: workflow added
Milestone: 0.11.6

Some examples that happened here: #7460, #8267.

comment:7 by osimons, 15 years ago

Cc: osimons added

Having just worked through the ticket update code for th:XmlRpcPlugin, this can be fixed by checking the timestamp on update requests before digging into the specifics of the request. Should be a simple matter of moving the timestamp-checking-lines further up in the validation code.

comment:8 by Eli Carter, 14 years ago

It may not be possible to "do the right thing" when the end state is the same; ticket actions may have side-effects beyond setting the ticket state and those may differ depending on the user doing the submit.

by Eli Carter, 14 years ago

possible fix (attempt 2)

comment:9 by Remy Blank, 14 years ago

The approach seems to work. However, the same effect can be achieved with a simpler patch. It just replaces the part where a TracError is raised with a warning. _validate_ticket() then in turn adds a message about "ticket modified by someone else".

Also, the reason why the <pre> tag looses its newlines is because it has the style white-space: normal (see trac.css). Adding a <br/> fixes that.

by Remy Blank, 14 years ago

Simpler fix.

comment:10 by Remy Blank, 14 years ago

Milestone: next-minor-0.12.x0.12
Owner: set to Eli Carter

comment:11 by Remy Blank, 14 years ago

Resolution: fixed
Status: newclosed

Second patch applied in [9443].

comment:12 by Remy Blank, 14 years ago

(with permission from ecarter on IRC)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Eli Carter.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Eli Carter to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.