Hi I need help with automatically counting the number story-ies connected to custom issue type Project
The number should change whenever i attach new story or detach a story from custom issue type "Project"
check the video for a detailed explanation -
Hi Petar,
Sure, you can do that. Create an automation rule base on an Issue Created.
The add a condition where Issue Type = Story
Then add an action for lookup issues.
Use this for the value for the lookup issues: parent = {{triggerIssue.parent}}
Then add an action for Create Variable. Variable name: TotalAssets. Smart value is: {{lookupIssues.size|0}}
Then add a Branch for Parent
Next add an action under the branch for Edit Issue. Choose the Total Assets field.
In the blank area under the field name put: {{TotalAssets}}
Update/Save/Give the rule a name. Then test it out!
I got this error message.
See the video of the whole automation - https://www.loom.com/share/0339608f0ea54ee4b05b9aaa8641d3b5
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
First thing, "project" already has a specific meaning in Jira, and so creating an issue type with that same name may have unintended consequences (e.g., cause confusion, lead to automation rule or JQL errors, etc.). Please use cause in automation rules to confirm the context is correct when checking for the issues.
Please post an image of your complete automation rule for context. That will help the community to offer better suggestions.
Until we see that...
The error you show in the audit log indicates this rule triggered for an issue which does not have a parent. To solve that symptom, add a condition after the trigger to check if the {issue.parent}} is not empty, or restructure the rule so it only proceeds when there is a parent:
Please note well: this only handles the scenario of when a new story is created and set to a parent at the same time. If you want this count to be accurate, additional rules will be needed for other scenarios:
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.
Can we automate the opposite way? I need all use cases covered, and I think the opposite way is a lot easier.
How I would do it logically
Trigger - on the transition to status "Scheduled"
Condition - issue type project
Action 1 - Lookup all issues that are (child off parent) of linked issue type and
Actopm 2 -vCreate a variable {{TotalAssets}} that is equal to the lookup issue count
Action 3 - Set Custom Issue Field Vavlue {{TotalAssets}}
I think this is an easier solution than what you suggested. I will just need help with looking up and counting.
See video exp -https://www.loom.com/share/bb1ef14342ad4d45adc2268de6a69580
Screenshot of the suggested rule
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.