Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Automation to copy User Field from PD to JSW

When we create a delivery issue from Product Discovery we are trying to use Automation to copy fields and I am running into some issues.

 I have been able to copy custom fields using Copy, Destination issue and selecting the fields.

I had a few issues with the fields being different field types in PD and JSW but worked that out but I am still stuck on People fields.

IN PD the People field looks like a multi select user field so I created that type of field in JSW. I still am not seeing the PD People field when I am trying to copy the field.

Is there another way I can copy this field over?

Thanks!

 

 

3 answers

1 accepted

Suggest an answer

Log in or Sign up to answer
1 vote
Answer accepted
Haddon Fisher
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.
Oct 11, 2023

When you say "I still am not seeing the PD People field when I am trying to copy the field" do you mean when you go into the Automation "Edit" action and look in the list of fields in the drop-down, you don't see it?

I can't say this for certain, but the custom fields functionality in JPD projects feels very similar to the custom fields functionality in team-managed Jira projects. If this is true, then it would not surprise me if user picker fields were not accessible to Automation in JPD projects. For whatever reason, Atlassian excluded these from the fields Automation can access easily; see AUTO-421 for more info on this and some other gaps in TMP's.

I am still somewhat banging my head against this problem myself, but it may be possible to use the "advanced edit" JSON options to do this though. 

Yes, that is exactly what I am doing. I appreciate your help.

Like Haddon Fisher likes this
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.
Oct 11, 2023

Hi @Jenifer Kuntz and @Haddon Fisher 

I believe the accountId attribute is available for team-managed project, People fields...and so it is most likely then available for JPD.

Setting the value may require using advanced edit with JSON, as described here:

https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/#Multi-user-picker-custom-field

As the source is a multiple-select field you can iterate over the values for the user add/update.

Kind regards,
Bill

Ugh, I am back on this and still having issues.

My automation is triggered when the issue is linked with a Polaris link.  

My edit issue action that copies some of the standard fields is using Destination Issue and this is working.

So for my my JSON I have this - 

{
"update": {
"customfield_10195": [
{
"set": { "Id" : "{{destination.Issues.XXX QA Assignee.accountId}}"}
}
]
}
}

I originally had it set just to "{{Issues.XXX QA Assignee.accountId}}"

I also tried to to add an issue lookup using this - issue in linkedissues({{issue.key}})

and the JSON 

{
"update": {
"customfield_10195": [
{
"set": { "Id" : "{{lookupIssues.XXX QA Assignee.accountId}}"}
}
]
}
}

All of these show Success but my field is not getting populated.  I verified the linked issue does have a user in the XXX QA Assignee field.

Any Ideas?

I appreciate the help!

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.
Oct 19, 2023

Your syntax for setting a single-select user field seems incorrect.  Please take a look at the linked documentation for an example.

0 votes
Haddon Fisher
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.
Oct 11, 2023

I'm not sure off the top of my head what the syntactical difference is, but that would absolutely explain the error message and is more than we've been able to come up with. Will look into it and post my fixed code shortly!

🙇‍♂️🙇‍♂️🙇‍♂️ Thanks Bill Sheboy!

0 votes
Haddon Fisher
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.
Oct 11, 2023

Thanks Bill Sheboy for that extra detail!

I'll pick the work back up next week and either post here or in a new thread, but in case you hit the same issue Jenifer Kuntz (and if you happen to know the solution Bill Sheboy 😁), I ran into some issues doing this. Long story short, we are trying to set a TMP project's user picker custom field (set to allow only a single user) using:

{
"update": {
"customfield_12345": [{
"set": { "id": "111111:11111111-1111-1111-1111-111111111111"}
}]
}
}

 and getting the error:

data was not an array (customfield_12345)

We've tried pulling the person from a field as well so the ID is not hardcoded, but I think we got the same result.

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.
Oct 11, 2023

You are using the multi-select user syntax in the JSON, but you note the field is configured as single-select.  For whatever the field type is, the syntaxes need to match.

Like Haddon Fisher likes this
TAGS
AUG Leaders

Atlassian Community Events