It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Filtering by status category

What I'd like is to create a dashboard that offers me this:

Rows: Team (this is a custom field)

Columns: Status Category (meaning "New", "In progress" and "Completed").

 

The reason is because we have about 50 Statuses on the project depending on the workflow used. I'd like to be able to simply show each team what they have New, what's In Progress and what's Done by grouping all the different statuses into the status category that JIRA already uses.

 

Is there any way to do this or a plugin that allows this?

Thanks!

Ovidiu.

2 answers

1 accepted

1 vote
Answer accepted
nic Community Leader Jun 08, 2015

I've done it with the Script runner addon - you can use that to create a "scripted field" on every issue that works out the current status category.  Once you've got the field, you can filter on it, and hence create a "2d filter table" on your dashboard.

So the idea is to edit each workflow on each transition to edit this field and then filter by it?

nic Community Leader Jun 08, 2015

No, sorry. That is actually another option - you could create a standard custom field and update it in all your workflows, but that feels a bit clunky and requires your admins to be careful when editing workflows (and rules out the use of simplified workflows completely) The trick with the script-runner is that the field is *derived* - you need a bit of code that reads the status, works out the category and returns it as the output. Scripted fields are read-only because they're calculated. No-one would need to do anything extra, you'd just get an extra field to use in filters and gadgets. (Oh, once you have it working, you'd need to reindex the system to get it populated, but that's a one-off task)

Or maybe even write a Script Runner JQL function, though that's a bit more work than a scripted field

Nic, can you show me the groovy code you used to derrive the status category? I've just searched Google for 30min and I couldn't find any reference to how to get the category.

This works to get the status, but how do I get the category?

Issue issue = issue

status = issue.getStatus()
status_name = status.getName()

return status_name

@nic Do filtering and sorting really work for scripted fields? As far as I observed they are not.

nic Community Leader Oct 10, 2018

Yes, it works fine.

I would like to take an opportunity to thank you a lot for all your answers here. You are doing a really tremendous work. I am getting most of information I need from your posts, they help me to build very versatile workflows with ScriptRunner.

statusCategory = indeterminate  (in progress)

statusCategory = done  (done)

 

+ new

+ undefined

Looks like the categories are now "To Do", "In Progress" or "Done" but it was this comment that got me where I needed to go, so it gets a vote. :)

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira

Calling all Jira Cloud users! Give us feedback on our exploration of a new navigation.

Hi everyone! My name’s Matt and I’m a product manager at Atlassian. I work in the navigation & findability space for all our Jira Cloud products. We’ve been working on trying to improve the exp...

1,246 views 20 13
Join discussion

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you