Effect of renaming a workflow state?

30 views
Skip to first unread message

Aikido Guy

unread,
Nov 3, 2020, 9:45:20 AM11/3/20
to Trac Users
Hi All,

I have quite a few trac projects and am considering changing my workflow states for all of them. In particular, I would like to rename the "accepted" state to something else.

What might this break (if anything)? And how might I fix it?

Kindly,
Aikido Guy

Aikido Guy

unread,
Nov 3, 2020, 9:57:25 AM11/3/20
to Trac Users
I may have answered my own question!


That the following SQL statement will likely be all that I need:
   UPDATE ticket SET status = 'accepted' WHERE status = 'assigned'

Can someone confirm please?

Kindly,
Aikido Guy

Aikido Guy

unread,
Nov 3, 2020, 10:48:27 AM11/3/20
to Trac Users
Alternatively, I see that [ticket-workflow] allows state.label = value to be used. Are there any situations where the label is not used? It seems like using accepted.label = in_progress might be the simplest approach...

RjOllos

unread,
Nov 3, 2020, 2:46:43 PM11/3/20
to Trac Users
On Tuesday, November 3, 2020 at 6:57:25 AM UTC-8 aiki...@gmail.com wrote:
I may have answered my own question!


That the following SQL statement will likely be all that I need:
   UPDATE ticket SET status = 'accepted' WHERE status = 'assigned'

Can someone confirm please?

Kindly,
Aikido Guy

You can set the status using Batch modify. See:

RjOllos

unread,
Nov 3, 2020, 2:53:14 PM11/3/20
to Trac Users
On Tuesday, November 3, 2020 at 7:48:27 AM UTC-8 aiki...@gmail.com wrote:
Alternatively, I see that [ticket-workflow] allows state.label = value to be used. Are there any situations where the label is not used? It seems like using accepted.label = in_progress might be the simplest approach...

The label should be used everywhere in Trac that the action is displayed.

Keep in mind the actions are different than states:
accept = new,accepted -> accepted

"accept" is the action, usually a verb. The states are "new", "accepted". The label renames the action and will be shown in the workflow action menu in place of the action name.

Usually the label is used to name an action with uppercase letters an/or whitespace, such as:
start_progress = Start Progress 

Aikido Guy

unread,
Nov 9, 2020, 5:50:06 PM11/9/20
to Trac Users
On Tuesday, November 3, 2020 at 2:53:14 PM UTC-5 RjOllos wrote:
So... I understand that the workflow could be changed to be something like:
start = new, in_progress  -> in_progress
start.label = Start the Work

It is a shame that "accept" a ticket is getting confused with "accept" the contents of the ticket (in my case); due to the nature of the specific project... oh well, guess I better clarify it or else the users will be really confused!

Kindly,
Aikido Guy

RjOllos

unread,
Nov 9, 2020, 6:19:06 PM11/9/20
to Trac Users
Yeah, that looks right.
Whether you need "in_progress  -> in_progress" transition depends on the operations for the action, such as set_owner. In some cases you might just prefer:
start = new  -> in_progress

Ryan
Reply all
Reply to author
Forward
0 new messages