We have some "umbrella" parent issues with per-platform child issues. The developers and QA would like to see the description (which is mostly in the parent ticket) without having to refer to the parent ticket, and I would like to keep the platform independent part of the description in sync in a single place.
What I tried:
1) First I tried just putting this at the top of one of the child tickets:
*Platform independent criteria from parent ticket*
{{issue.parent.description}}
When I looked at the actual JSON, it was getting escaped by the editor to: \{\\{issue.parent.description}}
I could not figure out a way to "unescape" my mustache in the editor.
2) Create an Automation Rule. I started small by creating a rule when my test ticket's description changes, Edit the issue and set the Description as follows:
START AUTOMATICALLY GENERATED SECTION, DO NOT EDIT OR REMOVE
*From Parent ticket*
{{issue.parent.description}}
END AUTOMATICALLY GENERATED SECTION
{{issue.description.remove(issue.description.match("START AUTOMATICALLY GENERATED SECTION.*END AUTOMATICALLY GENERATED SECTION"))}}
The rule just resulted in prefixing a copies of the literal text:
"START AUTOMATICALLY GENERATED SECTION, DO NOT EDIT OR REMOVE
*From Parent ticket*
END AUTOMATICALLY GENERATED SECTION"
to the description each time I made a small change.
Hello @Rohan Mahy
Welcome to the community!!
For the mentioned use case, I have created an Automation and it works as expected.
Please find below the screenshot of the parent and child ticket, which have been updated based on my understanding of the use case. Following them are the screenshots of the Automation rule. The rule can be further customised as per the requirements.
Kindly accept the answer if this helps resolve the query.
Hi Gaurav, the formulation you came up with will add the parent description repeatedly every time someone manually edits the description.
Also, for whatever reason, I could not get any fields from {{issue.parent.<whatever>}} .
I fiddled around and eventually I found this formulation which seems to work:
AUTOMATICALLY GENERATED START
{{issue.issuelinks.inwardIssue.description}}
AUTOMATICALLY GENERATED END
{{issue.description.replaceAll("AUTOMATICALLY GENERATED START.*AUTOMATICALLY GENERATED END\n(.*)", "$1")}}
I will try to hook this up to happen when parent descriptions are edited, however I am concerned that if "parent" is not being populated that it still won't work.
Thanks, -r
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.