You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
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?
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.