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?
Do you have a field that you're using to capture the company? If so, you can do something like this:
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(" - ")}}
We have created a custom field for the Company's name so this is perfect!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry about that... I was using subStringBefore when I should've been using subStringAfter. Try this instead:
{{triggerIssue.Test1}} - {{issue.summary.subStringAfter(" - ")}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
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.