Hi Community,
I have a typical mapping requirement regarding Parent-Child relation between Initiative and Epics.
Pre-conditions:
Current workflow:
Requirement is:
For eg:
Please guide on how I can configure the above use-case with the help of Jira automation, scriptrunner, JMWE app or any Post functions.
It would be a great learning for me.
Thanks
Thanks for clearly explaining your use case and requirements. This should be quite easily achievable using Automation. It might be depending on the version of Jira and/or the Automation plugin for Data Center, but in my 9.12 Jira DC test setup this should work for the In Progress status.
Similarly, you could create a copy of this rule for the Assessment setup, or try to combine it in one automation rule with another Parent branch, like so:
Thank you for your detailed explanation.
I tried configuring the same but not able to execute it successfully in any of the Child Projects.
I believe, we need to add all the three projects (P, C1, C2) in the Global Rule Details, as I want to set the status of Initiative (Parent issue) present in Project P based on the status of Epics (Child issues) present in Project C1 & C2.
However, after configuring the same automation logic under Admin settings > Automation rules > Global rule and performing the below steps:
The Audit Log is showing "No Actions Performed" and there is no status update in Initiative of Project P.
May you guide me further?
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just an another thought, is Branch - For Parent may be impacting in the automation?
So, in Rule, will it find the parent issue if there is a sub-task linked as Child? And is something related to "Parent Link" field?
Looking forward to hearing from you soon.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Regardless, I spent quite some time trying to make it work. And I got it to work, but I'm wondering if this is the best solution.
@Bill Sheboy could you please, as Automation Guru, validate and find any improvement opportunities if there are any?
The solution I found:
JQL used in the lookup issues step: "Parent Link" = {{triggerIssue.Parent Link}}
JQL used in the branch: key in ( {{childissues}} )
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Keep in mind by the way that the lookupissues function is limited to (I believe) a 100 issues maximum. As long as you don't put more than 100 Epics under a Initiative you should be good to go.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Digvijay Singh Gehlot and @Hans Polder _Devoteam_
I agree with the suggestion to use a JQL branch for this scenario. The smart values and hierarchy may be different than the built-in assumptions for parent branching.
Hans, I note you using the Lookup Issues action but then using different JQL in the branch. Did you intend that?
Back to the original scenario...
I believe using branch on JQL to access the parent Initiative, then using the Related Issues Condition with JQL could cover each case. But this may potentially lead to some timing / racetrack errors where the Initiative transitions multiple times during the same rule.
The fix could use what Hans noted with Lookup Issues:
If I was implementing this, I would use Create Variable after the Lookup Issues to first calculate counts for the Epics and their status values. Then use those variables in the condition checks. This would allow writing the variables to the audit log to help with testing / debugging.
For example, the count for epics In-Progress could be this:
{{#=}}0{{#lookupIssues}}{{#if(equals(status.name,"In-Progress"))}}+1{{/}}{{/}}{{/}}
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.
Thanks for the help @Bill Sheboy ,
My approach was as follows:
That smart value that you used for the varEpicsInProgress variable, is that something that just flows out of your fingers, or is there some sort of standard/tool/format that you use? It's pretty prone to error I can imagine, just forgetting one character would break it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Hans Polder _Devoteam_ , @Bill Sheboy ,
Thank you for your detailed explanation.
I followed both of your instructions in configuring the Rule with multiple projects restrictions as below:
First, I followed the same rule steps as suggested by Hans and observed that:
Second, I followed Bill's suggestion by making the changes in Create Variable in Hans Rule and observed that:
Please guide me further if I am missing any configuration in the Rule creation, I will make the necessary changes and then share my observations with you.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
It's hard to imagine all this without seeing actual screenshots. Can you please add these?
Also, it would be wise to add some 'Log Actions' in your automation so we can observe where it's going wrong.
So:
If you share the screenshot of your automation as well as the audit log, we can troubleshoot much quicker.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Regarding your question:
That smart value that you used for the varEpicsInProgress variable, is that something that just flows out of your fingers, or is there some sort of standard/tool/format that you use? It's pretty prone to error I can imagine, just forgetting one character would break it.
I write smart value, expressions like that so often I have learned to first create them in a coding text editor, such a Notepad++ with plugins. That ensures the syntax and bracketing match up. Only then do I copy them over to a rule for validation testing. This approach also helps me progressively improve them, seeing all versions...as change history is not visible in the automation rule editor.
And...I keep testing Jira projects specifically with template rules / expressions I expect to reuse.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your tips Bill, I'm eager to learn more - however let's keep this thread on-topic. I've created a separate thread here: https://community.atlassian.com/t5/Jira-questions/How-can-I-ensure-quality-smart-values-that-are-complex/qaq-p/2774247#M1039761 > hopefully you would be willing to lend a hand there to get me started? Much appreciated!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Hans Polder _Devoteam_ , @Bill Sheboy ,
I would like to share the screenshots of my Rule as requested below:
1) This is Rule details of my Rule:
2) This is the Audit log after configuring Rule and executing the required action:
3) This is the first part of the Rule:
4) This is the second part of the Rule:
I have tried multiple times to configure the rule as per your suggestions but I am unable to see Status update of Parent Issue in Project P based on the Status update of Child Issues in Project C1 and Project C2.
Please guide me further with an appropriate solution.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To help with context, please post an image of the entire rule in one picture and of the entire audit log details showing the rule run in one picture.
You can get those into one image using either an app or a browser extension which supports scrolling page image capture.
Next, if you view the audit log and compare to the rule steps shown {{childissues}} is empty. Where are you getting / setting the value of that smart value?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Ram Kumar Aravindakshan _Adaptavist_
Could you help me to achieve this use-case here: https://community.atlassian.com/t5/Jira-questions/How-to-set-the-status-of-Parent-Issue-based-on-the-statuses-of/qaq-p/2772641
By using Scriptrunner?
It would be a great learning for me to extend my knowledge of Scriptrunner scripting.
Looking forward to hearing from you soon.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Spend the day sharpening your skills in Atlassian Cloud Organization Admin or Jira Administration, then take the exam onsite. Already ready? Take one - or more - of 12 different certification exams while you’re in Anaheim at Team' 25.
Learn more
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.