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

Automation of Sub-Task Summary

Fabian Trejo Benitez July 28, 2022

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 created issue. Is there any way to do that? 

 

@Mark Segall 

2 answers

1 accepted

3 votes
Answer accepted
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 28, 2022

Hi @Fabian Trejo Benitez 

Do you have a field that you're using to capture the company?  If so, you can do something like this:

2022-07-28_11-17-09.jpg

Basically, what this is doing is taking the existing sub-task summary and prepending it with your Company value (I'm using a custom field called Test1 for illustration purposes) and the second portion ensures only the company is changed.

For copy/pasting, here's what I have for the summary:

{{triggerIssue.Test1}} - {{issue.summary.stringBefore(" - ")}}
Fabian Trejo Benitez July 28, 2022

We have created a custom field for the Company's name so this is perfect! 

Like Mark Segall likes this
Fabian Trejo Benitez July 28, 2022

Hi @Mark Segall it worked great except it deleted the name of the subtask that is automatically created from the template that we have. Is it possible to keep that the sentence that's already there and just add the company name? 

Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 28, 2022

Sorry about that... I was using subStringBefore when I should've been using subStringAfter.  Try this instead:

{{triggerIssue.Test1}} - {{issue.summary.subStringAfter(" - ")}}
Fabian Trejo Benitez July 28, 2022

Hi @Mark Segall  so it is still deleting the sentences after. This is what the original template and issue looks like and the second picture is after I change the custom field name. I hope this gives some clarity to our issue. Subtask before.PNGSubtask after.PNG

Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 28, 2022

Perhaps we need to put the company at the end of the summary because your template does not have a " - " in it yet, so it's not finding anything to retain.  Let's try this:

{{issue.summary.subStringBefore(" - ")}} - {{triggerIssue.company}}
1 vote
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 28, 2022

Hi Fabian - Welcome to the Atlassian Community!

Yes, you should be able to do that with an Automation Rule. 

What is the field in the parent that is getting updated? And is the field called the same thing in the sub-task? 

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