How to know the ordinal number of the current step in a Workflow

For statistical purposes,  I'd like to know if it possible to know the ordinal number (1 : first,  2 : second,  3 :third, so on)  of the current step in a WorkFlow.  Are they stored in a field perhaps?  At the moment, there are not any  script runner  plugin.  Thanks. 

3 answers

0 vote

If you mean "how many steps in a workflow", then no, it's not really stored, but you can just look at the workflow to see how many there are.

If you mean "how many status has a particular issue been through", then it's not directly stored, but you can work it out from the history.  Bear in mind that it's perfectly possible for issues to go back and forth, so your "ordinal" for, say, "in progress" might well be a set  (e.g. it was in that state 2nd, 4th, 7th, 9th, 14th etc)

You will need code if you want to expose these directly as fields.

0 vote
Joe Pitt Community Champion Jun 01, 2016

It sounds to me like you want to know if the workflow status has a number that represents it's position in the workflow, Like this Open (1) -> In Progress (2) -> test (3) - Closed (4) . If so, I don 't believe JIRA stores that. Remember, statuses can be used in many workflows so it can't be part of the status definition. If you need that you should create a custom field and populate it with the step number as you define it in a post function of the transition going into the status in question. So when moving from open to in progress you set it to 2.  Put the field only on the view screen so it can't be edited.

That's a better way of explaining what I was getting at in my second point.

In Joe's example, the ordinals for a well behaved issue would be 1, 2, 3, 4.  But imagine a failed test - you'd get it go through six ordinals, but not 1, 2, 3, 4, 5, 6.   It would be 1, 2, 3, 2, 3, 4.  So "ordinals" fail really because 2 and 3 are no longer unique.

Thanks a lot for your answers!

 

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Fadoua M. Boualem
Published Monday in Trello

Using Trello to manage events

As a Jira power user, I was at first doubtful that Trello could benefit my workflow. Jira already uses boards (ones you can customize!), so why would I even need to use Trello?! In this post you will...

522 views 8 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you