Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Update child description to contain some of parent description

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 Nov 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

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
Community showcase
Published in Jira Service Management

Next level incident management in Jira Service Management

Hello Atlassian Community! We’re thrilled to announce some exciting changes to incident management in Jira Service Management Cloud, in order to give your teams extra muscle during incidents, and ...

1,730 views 21 12
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you