Automation update subtask summary
Asked by Pauline Hild:

Hi everyone,

I'd like to create an automation rule that changes the summary of an automatically created subtask when the summary of the parent task is changed.

The problem now is that I used a value for the names of the subtasks (e.g. {{triggerIssue.summary}} Sample QC).

I already managed to create a rule that works for one subtask. My question now is: How do I have to set the rule that every single subtasks keeps it own name and just the {{triggerIssue.summary}} is changed?

I would be very grateful for help!

Kind regards,

Pauline

Screenshot 1: Automation that creates subtasks automatically

![Bildschirmfoto 2022-07-28 um 11.20.57.png](https://community.atlassian.com/t5/image/serverpage/image-id/208310i23C936A763900A85/image-size/large?v=v2&px=999 "Bildschirmfoto 2022-07-28 um 11.20.57.png")

Screenshot 2: Automation that keeps in sync summary of parent and task

![Bildschirmfoto 2022-07-28 um 11.21.27.png](https://community.atlassian.com/t5/image/serverpage/image-id/208311iCBFB641BDC7C1D94/image-dimensions/318x429?v=v2 "Bildschirmfoto 2022-07-28 um 11.21.27.png")

Screenshot 3: Configurations of the actions for the first subtask

![Bildschirmfoto 2022-07-28 um 11.21.34.png](https://community.atlassian.com/t5/image/serverpage/image-id/208313i5C039117B1BDEBB2/image-dimensions/505x248?v=v2 "Bildschirmfoto 2022-07-28 um 11.21.34.png")


Answers:
author: Mark Segall
body: Hi [@Pauline Hild](/t5/user/viewprofilepage/user-id/4773022) - Since you're using " - " as a delimiter between parent and sub-task, you could do this smart tag to update the sub-task:

```
{{triggerIssue.summary}} - {{issue.summary.substringAfter(" - ")}}
```

This will ensure the sub-task is always prepended with the parent issue and retains the original summary (e.g. Sample QC)

comments: author: Fabian Trejo Benitez
body: Hi [@Mark Segall](/t5/user/viewprofilepage/user-id/4666637) , I have a template created so sub-tasks are automatically put when an issue is created. I need to update the sub-task name when the company's name is updated in the issue. Is there any way to do that?


author: Mark Segall
body: Hi [@Fabian Trejo Benitez](/t5/user/viewprofilepage/user-id/4996467) and welcome to the community!

I would recommend asking this as a separate question so it doesn't get lost in the shuffle. Feel free to tag me on the question so I get notified and I'll be happy to help.


author: Pauline Hild
body: Hi [@Mark Segall](/t5/user/viewprofilepage/user-id/4666637)

thank you very much for your response. I've never worked with smart tags so I just tried to copy the smart tag you supposed into my automation rule.

The screenshot shows what happened but as I am a beginner with smart tags and automation rules I don't know what I have to change to make it work.

Kind regards,

Pauline

![Bildschirmfoto 2022-07-29 um 12.30.25.png](https://community.atlassian.com/t5/image/serverpage/image-id/208585i17558895C3ABA29F/image-size/large?v=v2&px=999 "Bildschirmfoto 2022-07-29 um 12.30.25.png")


author: Mark Segall
body: Hi [@Pauline Hild](/t5/user/viewprofilepage/user-id/4773022) - I think I see the issue:

++**Automation 1**++

Make sure each of your **Create Issue** components are setup like this:

```
{{triggerIssue.summary}} - Sample QC
```

**Note** - There's a " - " in the sub-task summary in my update. This is important for your second automation because it's looking for that delimiter.


author: Pauline Hild
body: Hi [@Mark Segall](/t5/user/viewprofilepage/user-id/4666637)

You were right, I added the "-" in all the subtasks and now it works.

Thank you very much for your help, I'm very happy! :)


Tags: cloud