Forums

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

Automation is failing to add the Product Onwer to the defect when new defect is created.

Glenn_Riley1 December 11, 2023

 

Why is my automation failing when it gets to adding the PO to the new defect?

 

Thanks for the help Glenn.

 

1 answer

0 votes
Mikael Sandberg
Community Champion
December 11, 2023

You may want to update your post and remove the URL, this is a public forum and most of us here are customers just like you and do not have access to other customers instances.

If you can post a screenshot of the error that you get that would be helpful, and also what your rule looks like.

Glenn_Riley1 December 11, 2023

URL removed, screenshot uploaded

Mikael Sandberg
Community Champion
December 11, 2023

It looks like the screenshot was not saved when you uploaded it...

Glenn_Riley1 December 11, 2023

2023-12-11_13-16-36.png

Mikael Sandberg
Community Champion
December 11, 2023

Is the project a team-managed or company-managed? The error you get indicate that you have more than one field called Product Owner and if you are using a company-managed project then you can use the advanced option to set the owner by adding this to the advanced option:

{ "fields": { "customfield_12345": { "id": "<atlassian Id>" } } }

You can get the custom field Id by going to Settings > Issues > Custom field and locate the Product Owner field. Then click the three dots and hover over one of the options, the URL will have the Id for the field at the end.

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 11, 2023

Hi @Glenn_Riley1 

Adding to Mikael's answer...

This symptom can also happen when the issue is not fully loaded after the Issue Created trigger.  The work-around for this known problem is to add a Re-fetch Issue action immediately after the trigger.

And also: I note your rule is performing 4 different edits on the trigger issue.  That can "walk over" prior results, because the issue is repeatedly starting with the data from the point in time of the rule triggering.  Please try to combine those and perform one single edit action, selecting each of the fields from the drop-down list.

Kind regards,
Bill

Like Mikael Sandberg likes this
Glenn_Riley1 December 11, 2023

I have the ID cf[10167] = 6169cf0d9cdb9300722233ab), what I don’t know is how to write the script in the correct syntax.

Can you write the syntax ?

Mikael Sandberg
Community Champion
December 11, 2023

This should do it:

{ "fields": { "customfield_10167": { "id": "6169cf0d9cdb9300722233ab" } } }
Glenn_Riley1 December 13, 2023

Thanks, PO is now populating during automation

Suggest an answer

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

Atlassian Community Events