Hi,
I am new to script runner and how to use it in Jira. I like to write the script runner and apply it to the Button "Sprint" in Jira so when customers start the Active Sprint, it will check the story point and time tracking in each issue before it lets the customer start an Active Sprint. It will load up the issue that does not have story point and time tracking. I am really appreciated your help.
Thanks
John
Hi John
By customer, do you mean jira users? Customers in Jira usually refer to Service Desk Customers. They don't have access to Jira Software functionality and should never be able to create sprints.
I am not sure what your goal is. What do you mean by "load up the issues that do not have story points"?
Do you want to prevent the users from starting a sprint if issues don't have story points and estimates?
Unlike issue workflow, there is no "validator" configuration that can be leveraged by scriptrunner to test the content of your sprint and allow or not the starting of the script.
We can create an event listener that will react (after the fact) to the sprint start event, but it will not be able to cancel the event and prevent the start (or provide any feedback to the user).
But such listener could be configured to send an email to someone (or many someones) alerting them of the situation.
The other possibility is to try to HIDE the "Start Sprint" button until all issues have met the validation rules. But that might confuse users and they will not know why they can sometimes see the Start Sprint button or not and the helpdesk will get many calls about that.
Hi Peter,
do you mean Jira users? Yes, Jira Project Manager who has admin to project.
Do you want to prevent the users from starting a sprint if issues don't have story points and estimates? Yes.
I came up with the solution "required" field need to enter (see the screenshots) but my manager wants me to use script runner to validate.
I put pre-condition in workflow to stop user to go to next stage if they don't fill out the story point and time tracking. However, I don't know how to display the notification to users that "you forget to enter story point"
=========================================================
Here is what I have to do:
Story point -- auto - filter out the project is not using story point or issue is not using story point and time tracking
We need the script to "The active sprint is not started until the story point and time tracking is there"
Active sprint -> do they have story point and Time Tracking ? Send auto email to customer if they don't comply (if they don't have time tracking and missing story points)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For the new issues, I turned on the "required" field for story point and time tracking. However, for the old issues and projects, I need the scripts or methods to find out that the project or past issues did not have data in the story point. (either zero or something)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you add "Story Points" and "time tracking" in "Field Required Validator" in the workflow and remove "Required" in field configuration, you should get a visible message when the user tries to Create issue and forget one or the other.
The active sprint is not started until the story point and time tracking is there"
I don't think this is possible with scriptrunner like I said in my earlier response. Scriptrunner doesn't have access to the Start Sprint button.
You could just perform a search using JQL
sprint is not empty and ("Story Points" is empty or timeestimate is empty)
to find all the existing issues that are missing these values
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Peter,
When I try to run the query
sprint is not empty and ("Story Points" is empty or timeestimate is empty)
the result comes out not correct. The sprint is not empty but the story point is not empty either. I tried to change parentheses but it did not work well.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try to break it down... for me, all three of those work:
Then combine them back together.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I mean combine them into a single query.
This returns all the issues that are in a sprint
sprint is not empty
Then this returns all the issues that are missing one or the other of the estimates you care about:
"Story Points" is empty or timeestimate is empty
Combined together, you will have all the issues that are in a sprint but are not fully estimated:
sprint is not empty AND ("Story Points" is empty OR timeestimate is empty)
This is to find issues that were created before you (presumably) added the rules discussed above (validators etc.).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, a new addon "Scrum Assistant" for the DC version has just been released. It checks the estimates for tasks in Story Point at the start of the sprint, as well as when adding tasks to the active sprint.
Very convenient if you don't want to write scripts.
Maybe this will help you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.