My goal is to be able to subtract Story points from an Initiative when a new story/task is pointed underneath the Initiative and Epic.
Some background: My org uses the "Parent" field to in stories to identify the parent epic. And Epics also use the same "Parent" field to identify the parent Initiative.
The hierarchy I am working with is
1. Initiative
2. Epic
3. Story/Task
I am essentially trying to use automation to subtract "Planned Story points" from the Initiative when a new story has "Story points" added to it. And I am trying to accomplish this without touching the parent epic.
I have tried a few different methods including below. Branch to the parent seems to affect the Epic and not the Initiative. Would anyone know the JQL I can use to essential branch to the Parent of a Parent?
Hi @Jeffrey Crime -- Welcome to the Atlassian Community!
To do what you ask, you will want to change the branch to use JQL to get to the parent of the parent (i.e., the Initiative). I am not using the Premium license level, so let's test some things first...
I expect that not to work, but I will be pleasantly surprised if it does provide the Initiative key.
Why that might not work...
When an automation rule references the other issues linked to the current issue (e.g., the parent) only some of the linked issue's fields are available. If it did not do that, you could imagine that a single issue could yank in tons of data, though subtasks, issue links, etc.
If it works, you are set and can use that with a JQL branch (instead of branch to parent) to update the Initiative.
Assuming that did not work...We need the epic's parent, so after your condition test on the issue type, let's add more actions (shown in italics below):
Kind regards,
Bill
Hi! Thanks for the quick response! I tried going with your first suggestion with the test rule using the JQL - {{issue.parent.parent.key}} to reference the Initiative from the triggered story. No luck.
As far as your second suggestion, I input the suggested logic into the automation, however I am getting following issues when trying to execute:
Lookup Issues
There was an error executing a search during custom value definition: .
Custom Smart Value JQL Search: "(Jira-1) AND (project in (10199))" - Error in the JQL Query: Expecting operator but got ')'. The valid operators are '=', '!=', '<', '>', '<=', '>=', '~', '!~', 'IN', 'NOT IN', 'IS' and 'IS NOT'. (line 1, character 11)
Branch Rule/ Related Issues
Error searching for related issues. This is most likely because the following issues don't have a related issue of the type you specified. Try narrowing your search to only include issues that contain links to related issues:
Jira-2: "((key = ) AND (key != Jira-2)) AND (project in (10199))" - Error in JQL Query: Expecting either a value, list or function but got ')'. You must surround ')' in quotation marks to use it as a value. (line 1, character 9)
Could it be the way I am branching into the Parent key perhaps?
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I see a typo where the name of your created variable does not match the name of the one used in the branch.
Also, the JQL for the branch should be:
key = {{varInitiativeKey}}
And not just the variable.
Would you please show the details of your create variable action to confirm this? Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the point out! Fixed any typos I saw. Perhaps it could be the Smart value I am inputting?
New to Jira automation so i'm interested in how it works. Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If that is still not working, would you pleases post an image of the audit log details showing the rule executing?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sure. I posted the audit log as well as the full automation sequence. Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The lookup issues action in the third step of your rule has invalid JQL. That should be:
key = {{triggerIssue.parent.key}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is Working now! Thanks so much for your patients and help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How do I show Planned Quarter from the Feature(Parent) for a corresponding Story(Child)? Tried the following and not working
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi SD -- Welcome to the Atlassian Community!
As described earlier in this thread, all fields for a parent issue are not loaded when viewed from the child in an automation rule. If they did, a large amount of information could be pulled in for a single issue.
This can be checked by writing your field to the audit log, such as with {{issue.parent.someField}} and if it is empty, the parent issue must be loaded another way, such as with the Lookup Issues action or branching.
Next, smart values are name, spacing, and case-sensitive. And, the smart value may not match the display name of the field on your Jira page views. When an incorrect smart value is used, it returns null and may not show any errors in the rule.
To identify the correct smart value for your field, please use this how-to article: https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Decided to use the following until I can figure out how to fetch the value = Qn from the Feature(Parent).
Scheduled:
Lookup:
{{#lookupIssues}}
* Issue Key: <b>{{key}}</b> (<a>{{url}}</a>)
* Summary: <a>{{Summary}}</a>
* Assignee: <a><b>{{assignee.displayName}} </b></a>
* Planned Quarter: <a>{{created.format("YYYY")}} Q{{created.format("Q")}} </a>
* Created: <a>{{created.shortDateTime}} </a>
* Updated: <a>{{updated.shortDateTime}} </a>
{{/}}
Send Email:
returns Planned Quarter: 2024 Q3
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.