Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation: create ticket from existing and additively copy labls

Laci Kremer February 15, 2023

I'm building an automation that creates a new ticket based on ticket activity. I'd like to copy the labels from the trigger issue and also add a new label to the newly created one.

 

With using the Add Labels from Trigger issue (by selecting the Copy -> select Add to existing values):

image.png

and trying to set the labels in the Additional fields section:

 

image.png

 

I'm getting the following error:

Field 'labels' cannot appear in both 'fields' and 'update'.

 

So to sum up: my goal is to create a new ticket based on ticket update activity and copy the existing labels and also add a new label to the new ticket.

 

Do you know how to do it?

2 answers

1 accepted

1 vote
Answer accepted
Jeroen Poismans
Community Champion
February 15, 2023

Hi,

Don't know if you've tried splitting up the action?

So first an action in the rule to copy the labels, then in the same rule an action where you put in the additional fields?

 

Hope this helps!

Jeroen

Laci Kremer February 15, 2023

Can I split the Create issue to two actions? Like the first would create the ticket and the second would update the newly created one?

 

How do I refer to the newly created ticket in the second action?

Jeroen Poismans
Community Champion
February 15, 2023

Hi,

Here is how you could do this using the Branch in automation:

Screenshot 2023-02-15 at 15.40.40.png

 

The first action Creates the issue, copying the labels from the trigger, then the Branch is set on all Created issues in this rule, so whatever you put under there is going to happen on the newly created issue. 

There I put another Edit Issue action where you can just provide the new label to be added:

Screenshot 2023-02-15 at 15.43.12.png

Works on this end, hope it helps you!

Regards,

Jeroen

Laci Kremer February 23, 2023

Thanks Jeroen,

 

This is exactly what was needed. I missed the Branch functionality, but now it works!

Laci Kremer February 23, 2023

I just realized that using branch is not even needed, using the function Copy from  trigger issue when defining the Labels lets you add additional values:

 

image.png

 

Anyway, thanks for hinting the Branch functionality!

Like Walter Lamm likes this
Walter Lamm
Contributor
August 13, 2024

@Laci Kremer Thanks, that solved my problem.

1 vote
Riley Venable
Community Champion
February 15, 2023

You can use the "Add Labels from Trigger Issue" action to copy the labels from the trigger issue and then use the "Set Field Value" action to add a new label to the newly created ticket.

Laci Kremer February 23, 2023

Thanks Riley,

 

I've tried this, but simply using the Edit issue will update the trigger issue, not the newly created one. Also, if you try to set i in the json section, that doesn't work, throws an error.

See Jeroen's solution on using the Branch functionality. 

Suggest an answer

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

Atlassian Community Events