I would like to update my Story's cost (story points) with the sum of all the tasks related to it (using "Relates to" connection).
Trigger (1 of 2 options):
- Schedual task that runs daily
- When a task is linked to the Story
I would like the sum of all the related tasks, to be populated in a a new filed in the Story, called "Total cost"
All the articals I found here explains how to do it with Sub-tasks, but its not solving my issues.
Hi @ori gal - I would recommend using a different link type. "Relates To" does not provide a "inbound/outbound" link like "Blocks/Blocked By" which makes it difficult to identify the "source" and "target" issues in automation regardless of whether you're using an Issue Linked or Scheduled Trigger.
If you go with say "Blocks/Is Blocked By", you could do this (note I'm copying the help text from the Issue Linked trigger so you can further understand the importance of the link type):
Rule executes when an issue is linked to another issue. {{issue}} will always refer to the source issue, so if ISSUE-A is blocked by ISSUE-B, this rule will execute on ISSUE-B. To access ISSUE-A, use {{destinationIssue}}, and to access the link type, use {{linkType}} (e.g. {{linkType}}
issueBlocks = {{destinationIssue}}
{{lookupIssues.Story Points.Sum}}
Hi @Mark Segall ,
Thank you for the prompt response!
Im not sure about using "Blocks/Is Blocked By" as it represents a different status.
Are you saying that useing "Relates to" link will generate the result Im trying to reach?
Also, I dont want to update the Story "Story points" rather a custom filed I've created by the name of "Total cost". can you help me understand how to do it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Im not sure about using "Blocks/Is Blocked By" as it represents a different status.Are you saying that useing "Relates to" link will generate the result Im trying to reach?
It doesn't have to be Blocks. I was only using that as an example. Relates To will not work because it doesn't have a clear inbound/outbound reference. The only way that automation (or JQL) can identify which issue should be the focal point is by having a an understandable inbound/outbound reference which is provided by stock link types like Blocks and Clones. You could create a custom link type if neither of those work for you, but you'll need something that is clear.
Also, I dont want to update the Story "Story points" rather a custom filed I've created by the name of "Total cost". can you help me understand how to do it?
The rule I provided will sum up the Story Points field from all of the linked issues into the Total Cost field. If you're wanting to Sum up the Total cost field from all linked issues it would just be changed to this:
{{lookupIssues.Total Cost.Sum}}
NOTE - If your Total Cost field was not created as a Numeric field, you'll need to adjust it to something like this:
{{lookupIssues.Total Cost.asNumber.Sum}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Mark!
I wasnt familiar with the 'reference' concept nor with the inbound/outbound.
2 followup questions:
1. How can I know which of the Linked issues are inbound and which are oroutbound?
2. How can I create a new type of Linked issues?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1. How can I know which of the Linked issues are inbound and which are oroutbound?
Using the Relates To, you won't have that concept which is why using this link type would be challenging, if not impossible. You'd need some other mechanism for Automation to be able to delineate between which issues are being summed up and which issue will be storing the total.
2. How can I create a new type of Linked issues?
You can access it through Settings >> Issues >> Issue Linking or here:
https://YOURINSTANCE.atlassian.net/secure/admin/ViewLinkTypes!default.jspa
NOTE - You need to be a Jira Admin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I will look into that.
1 last question. in the solution you suggested, you used the setup here below.
Any chance you can show me how it should look? Im having issues setting it up.
BRANCH (Destination Issue)
ACTION: Edit Issue (Total Cost)
{{lookupIssues.Story Points.Sum}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sure - Here's a screenshot:
Specifically, for the branch component, you'd select Branch rule/related issues and then select Destination Issue from the dropdown.
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.