Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Workflow status order

Scott McDonald
Contributor
October 26, 2021

Hello - 

In JIRA Server, the workflow status under Issues --> Issue Attributes --> Statuses seem to be in a random order (perhaps order of operation), but there isn't a good way to alphabetize these without moving them one by one. 

It also looks like it's configured this way to assist in the JQL so when a user does an ORDERBY at the end of their statement, it will return the values in this order.

Is there a database script to get me the results I'm looking for or a change coming in the Server products?

Thanks in advance,

Scott

1 answer

1 accepted

6 votes
Answer accepted
Mikael Sandberg
Community Champion
October 26, 2021

You can set the order of the transitions by setting the opsbar-sequence. You should consider using values like 0, 10, 20... in order to make it easier to make changes to the order later.

Scott McDonald
Contributor
October 27, 2021

Hi  @Mikael Sandberg ,

Perhaps Im entering the info incorrectly, but when I go to to view the order of buttons on the view issue screen or viewing issues returned in JQL, they are not in the order I specified via opsbar-sequence.  I'm using: 

 To change the order of transition buttons:

To change the order of transition buttons, including additional transitions in the Workflow menu, add the property key opsbar-sequence to each workflow transitions that you wish to reorder. Each opsbar-sequence property key requires a property value that defines the order of the transition action on issue views.

  1. Go to the transition's properties, as described in transitions above.
  2. Type opsbar-sequence into the Property Key field, under 'Add New Property'.
  3. Type a value In the Property Value field, The value must be a positive integer (starting at '0'); it defines the order of the transition buttons on issue views.
    Consider using a sequence of opsbar-sequence property values like 10, 20, 30... to allow new transitions to be easily added later.
  4. Click Add.

 

 Adding the opsbar-sequence property to a workflow transition does not change the order of these transitions in the workflow in Text edit mode. The addition of this property only affects the order of transitions on the View issue page.

 

I'm using quantities of ten with the property value.  

For instance, in the status Open, I have property key = opsbar-sequence and property value = 10,  next status = 20, etc. I've even added the value of 30 to the 4th status and 40 to the 3rd status, to verify the order.

Mikael Sandberg
Community Champion
October 27, 2021

@Scott McDonald the opsbar-sequence only applies to how the transitions/statuses are ordered under the Workflow buttons, it will not have any affect to filters or views. Your filters and views are ordered based on the ORDER BY.

Scott McDonald
Contributor
October 27, 2021

@Mikael Sandberg , you mean when I go into an issue, I should see the workflow buttons in the order I have via my opsbar-sequence definition, correct?

Mikael Sandberg
Community Champion
October 27, 2021

Correct, you should see three up to two buttons for each transition that is available based on where you are in the workflow, and if you have more than two transitions available you will also see the Workflow button. The order of these buttons are controlled by opsbar-sequence.

Scott McDonald
Contributor
October 27, 2021

@Mikael Sandberg

I'm starting to understand. When I give the transition (ID) a value, and not edit the properties of the actual step name, I see the results I'm looking for.  

And to confirm, if I ORDER BY ASC in my filter, the ops-sequence plays no part, correct?  I will have to manipulate my JQL to get the results I want?

Mikael Sandberg
Community Champion
October 27, 2021

Correct, opsbar-sequence only affects the buttons, it has nothing to do with your JQLs. For those you have to use the ORDER BY.

Scott McDonald
Contributor
October 28, 2021

@Mikael Sandberg 

I found this - https://jira.atlassian.com/browse/JRASERVER-5189.  This appears to be available in Cloud, but no Server?

Looks like that is a system wide change and not just a specific workflow, correct?

Mikael Sandberg
Community Champion
October 28, 2021

The workaround for that issue only applies to Server/Data Center, not Cloud, so you should be able to do that. Just make sure making any changes to the database that you have a full backup in case something goes wrong.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.17.1
TAGS
AUG Leaders

Atlassian Community Events