Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

When an Issue is assigned to a Sprint, story points should not be blank

Gopikrishna Mamidipudi July 17, 2024

 

When an Issue is assigned to a Sprint, story points should not be blank

4 answers

3 accepted

0 votes
Answer accepted
Jacques July 17, 2024

Hello @Gopikrishna Mamidipudi,

I have just created this automation, and it works for me:

Screenshot 2024-07-18 074323.png

It's pretty simple: The rule checks for every change in the Sprint field. If there is a change, it then checks the value of the Story Points field. If this field is empty, then it removes the value from the Sprint.

You can further adapt this as necessary.

This is the exported automation rule (save the text as .json) and then import it in your instance. Some updates might be required.

{"cloud":true,"rules":[{"id":20566842,"clientKey":"9f6d66b3-f584-3276-85f4-ba3ca4f68737","name":"Remove sprint if Story Points is empty","state":"ENABLED","description":"","authorAccountId":"557058:2ea5f4bb-5249-42bb-9eae-b792574d5001","actor":{"type":"ACCOUNT_ID","value":"557058:f58131cb-b67d-43c7-b30d-6b58d40bd077"},"created":1721281192266,"updated":1721281192266,"trigger":{"id":"490049582","component":"TRIGGER","parentId":null,"conditionParentId":null,"schemaVersion":2,"type":"jira.issue.field.changed","value":{"changeType":"ANY_CHANGE","fields":[{"value":"Sprint","type":"fieldName"}],"actions":[]},"children":[],"conditions":[],"connectionId":null},"components":[{"id":"490049583","component":"CONDITION","parentId":null,"conditionParentId":null,"schemaVersion":3,"type":"jira.issue.condition","value":{"selectedField":{"type":"NAME","value":"Story Points"},"selectedFieldType":"com.atlassian.jira.plugin.system.customfieldtypes:float","comparison":"EMPTY","compareValue":null},"children":[],"conditions":[],"connectionId":null},{"id":"490049584","component":"ACTION","parentId":null,"conditionParentId":null,"schemaVersion":10,"type":"jira.issue.edit","value":{"operations":[{"field":{"type":"NAME","value":"Sprint"},"fieldType":"com.pyxis.greenhopper.jira:gh-sprint","type":"SET","value":null}],"advancedFields":null,"sendNotifications":true},"children":[],"conditions":[],"connectionId":null}],"canOtherRuleTrigger":false,"notifyOnError":"FIRSTERROR","projects":[],"labels":[],"tags":[],"ruleScope":{"resources":["ari:cloud:jira::site/b36b6567-78b1-4f62-a4c6-075678c97824"]},"ruleHome":{"ruleLifecycleHome":{"locationARI":"ari:cloud:jira-core::site/b36b6567-78b1-4f62-a4c6-075678c97824"},"ruleBillingHome":{"locationARI":"ari:cloud:jira-core::site/b36b6567-78b1-4f62-a4c6-075678c97824"}},"writeAccessType":"UNRESTRICTED","collaborators":[],"billingType":"NORMAL"}]}

Hope this helps!

 

Gopikrishna Mamidipudi

0 votes
Answer accepted
Adolfo Casari
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.
July 17, 2024

I am not sure whether you can implement a validator within automation, but you could reset the Sprint back to empty if Story Points is empty .... or flag the issue:

https://community.atlassian.com/t5/Jira-questions/Use-automation-to-flag-issue/qaq-p/1415974

to highlights issues in the sprint without estimation (actually I would do this when you start the sprint). Then you can add another rule that unflag the issue when the estimation is set.

Hope it helps,

Gopikrishna Mamidipudi July 18, 2024

Okay. Can I at least pop-up a message that "Ticket cannot be assigned to a Sprint till you enter the Story Points for it."?

Gopikrishna Mamidipudi July 18, 2024

When I Add a Comment - can I @ the Assignee in the comment?

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 18, 2024

Yes, if you are talking about adding a comment in an Automation Rule. Refer to

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-users/

0 votes
Answer accepted
Gopikrishna Mamidipudi July 17, 2024

I have the following Automation but how do I get it to work?

 

"When Value Changes for SPRINT?"

 

"If SPRINT is not empty?

 

If STORY POINTS is empty?

 

Edit STORY POINTS

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 17, 2024

Hello @Gopikrishna Mamidipudi 

Welcome to the Atlassian community.

Please provide screen images of the rule you have created and explain how the results are not what you expect.

Please also provide screen images showing the details of the Audit Log for the rule execution.

Gopikrishna Mamidipudi July 18, 2024

Picture1.pngPicture2.pngPicture3.pngPicture4.png

Story Points is EMPTY and I'm able to assign the ticket to a Sprint.

Nothing happened – and it shows a SUCCESS in the AuditLog.

I was hoping the last step in Rule – “Edit Story Points” – will pop up the JIRA ticket and not save the Sprint info.

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 18, 2024

Screenshot 2024-07-18 at 9.30.56 AM.png

This rule worked for me.

Did you make sure to refresh the issue view after the rule completed?

Gopikrishna Mamidipudi July 18, 2024

What am I looking for? Will the cursor go land in the Story Points field? I'm not sure what to expect with the action "Edit"?

 

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 18, 2024

Rules run in the background using the Jira REST API. The execution of the rule will not open any screens or pop up any messages.

When you change the sprint field directly in the issue view or through the Backlog screen, that will trigger the rule. The rule will run. After the rule completes you would need to refresh the tab where you have the issue displayed in order to see changes made by the rule.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events