Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Update child description to contain some of parent description

Rohan Mahy November 10, 2021

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.

 

 

 

1 answer

0 votes
Gaurav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 11, 2021

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.

Parent Issue.JPGChild Issue.JPGRule 1.JPGRule 2.JPG

Rohan Mahy November 13, 2021

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

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events