Forums

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

Active sprint is not started until the story point and time tracking is there

John
Contributor
January 19, 2022

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 

2 answers

1 accepted

0 votes
Answer accepted
PD Sheehan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 19, 2022

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.

John
Contributor
January 19, 2022

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" Active Sprint.pngCreate.pngValidator.png

 

========================================Story Issue.png=================

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)

John
Contributor
January 19, 2022

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)

PD Sheehan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 19, 2022

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

Like John likes this
John
Contributor
January 19, 2022

Thank you so much for your time Peter-Dave.  I will look at your recommendations. 

John
Contributor
January 20, 2022

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.  

John
Contributor
January 20, 2022

Sprint is not EMPTY AND "Story Points" is EMPTY is working fine.  It returns Sprint with an empty story point. 

PD Sheehan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 20, 2022

Try to break it down... for me, all three of those work:

  • timeestimate IS EMPTY
  • "Story Point" IS EMPTY
  • Sprint IS NOT EMPTY

Then combine them back together.

Like John likes this
John
Contributor
January 29, 2022

Hi Peter,

I did those queries and had results.  How do I combine the result?  Do I export to CSV file to combine the result?

PD Sheehan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 29, 2022

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.). 

Like # people like this
John
Contributor
January 29, 2022

Thank you very much Peter.

0 votes
Thomas Johnson June 25, 2022

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events