Hello Together,
I want to link Linking one category of tasks under one EPIC to one Story Point based on Summary. Could you please help me with automation of this (creating a Rule) ?
Thank you!
Hello @Vaishnavi Deshpande
Welcome to the Atlassian community.
Have you tried to construct this rule? If you have, please share screen images showing us the entire rule.
If it is not performing as you intended, explain to us what it is actually doing and how that doesn't match your intention.
Please also provide screen images showing the details from the rule execution Audit Log for when the rule executed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
These are the screenshots of the Rule.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for those screen images.
Can you address the requests in the other two paragraphs of my answer?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is the screen shot from the AuditLog. I have to run this at the EPIC. All the tasks under the EPIC which start with or contains Safety Analyses in Summary shall be linked to the Story under the same EPIC which has "Safety Analyses" in Summary.
This should be manually triggered rule. Conditions: EPIC is in Progress.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
But now what is happening is, when I execute it at EPIC, it says it finds tasks and story. But not linking them.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Vaishnavi Deshpande
Thank you for that additional information.
Jira has an issue hierarchy that specifies which issue types can be parents (or children) of other issue types. The default hierarchy is:
Level 1: Epics
|-- Level 0: standard issue types (i.e. Story, Task, Bug)
|-- Level -1: sub-tasks
The parent/child relationship can be created only between issue types that are in adjacent levels.
This relationship is tracked by setting the Parent field in the child issue to the issue key of the parent issue.
When your rule is triggered by an Epic, the For Children branch changes the focus to the Level 0 child issues of the Epic.
You check each child issue, one at a time to see if it is a Task and if its Summary contains specific text.
If it does, you then execute a Lookup Issue action to find other issues that are children of the same Epic, with the same Summary text, but are the Story issue type. This action is looking for other Level 0 issues that are "siblings" of the Task.
Then, in the Edit action, you are attempting to set the Parent field in the Task to the issue key of of one of its sibling Story issues. Both are Level 0 issues so one cannot be the Parent of the other.
Why are you trying to make a Story a Parent of a Task?
If you want to link the two together you can use the native Issue Linking functionality to create a generic link between them. This will not be seen by Jira as a parent/child relationship.
To use that option remove the "parent": "{{lookupIssues.key}}" line from the JSON code and add this in the Edit Action.
Check the box next to Linked Issues, then select the link type and enter the smart value for a single issue to link to.
However, you have a challenge here. When setting an issue link you can link to only one issue at a time. The smart value must identify only one issue. Notice in my smart value I used .first. That indicates that I want the key of just the first issue returned in the Lookup Issues action. The smart value {{lookupIssues.key}} doesn't specify which issue in the Lookup Issues results set to reference. If there is only one issue in the result set, that smart value would work. But if there are multiple issues then it will fail with this message:
Your Lookup for Story issue types could find multiple Story issues. Is that going to be a possibility? Is it likely that there will be more than one matching Story found?
Side note:
You can also set the Labels field without using JSON code.
Fo any field that you set by selecting the field as above make sure that you are not also setting that field with JSON code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.