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

Problems setting a custom field with json automation

Hello,

I have started to learn automations for Jira a couple of months ago, but I've stumbled with a problem.

We have an approver field, with the configuration of making the assigned user to set it, but we want to set it with an automation.

With this code, it seems that works fine:

{
"fields": {
"customfield_10112": "{{issue.reporter.asJsonString}}"
}
}

image.png

But it does not, it doesn't return an error but also does not update the field:

image.pngimage.png

I have also tried to use the user ID, but the field won't accept it with this format.

TIA.

Ton

 

1 answer

0 votes
Marc Koppelaar
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 @Ton Rigat 

Welcome to the community.

I expect you want the issue reporter to be the approver.

You don't need to use the advanced option, you can use the smart value {{issue.Reporter}}:

Capture d’écran 2020-10-23 à 11.52.51.png

Will this help solve your issue?

Thanks for the fast answer.

It's not exactly right, it works but not with the same field:

image.png

image.png

The problem is that the field "Reviewer" does not appear in the list of fields, that is why I was trying to do it with JSON

Marc Koppelaar
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 @Ton Rigat 

I expect that the custom field Reviewer is also of the type single or multi user.

Try to set the Reviewer as follows

{
"fields": {
"customfield_10112": { 'id": "{{reporter.accountId}}"}
}
}

Still something wrong:

image.pngI used both variants: issue.reporter.accountID and reporter.accountID

Both return the same error. 

Marc Koppelaar
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 @Ton Rigat 

What is the field type of the custom field "Reviewer"?

It's autogenerated by Jira, I guess it's user type.

image.png

Suggest an answer

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

Atlassian Community Events