The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Custom field to count number of Issues matching Status Category by Organization

Leon Bennetts
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 19, 2021

Using JIRA Service Management and JIRA Cloud

We have a service where customers are limited to X number of In Progress requests at once - depending on their subscription level.

I need a custom field visible on each Request, that shows how many Issues that Organization has Open that match the category "In Progress".

How would I write a script to do this?

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Kristian Walker _Adaptavist_
Community Champion
January 20, 2021

Hi Leon,

Thank you for your question.

I can confirm that ScriptRunner for Jira Cloud can allow you to create a custom field using a Script Listener that calculates a value using either a Script Listener as shown here or that calculates a value using a Scripted Field as shown here.

Using this you would be able to write a script which called the Search for issues API in order to search for issues that match your request using a JQL search and then to count the number of issues returned and to store these in the field.

I can confirm that the example located here shows an example of how the Search for issues API works and can be used as a reference guide to help you to create the script that you require.

Regards,

Kristian

TAGS
AUG Leaders

Atlassian Community Events