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 - Specify a valid value for Currency (SL) (customfield_10077) - JSON error

Hello, 

I have a problem with the following code in JIRA Automation. 

I have a field Currency (SL) / customfield_10077 which is a select list that I want to auto Populate with the value linked to the Instrument (IF) / customfield_10923 - attribute Currency

I get a Text field to update but not a Select list:

e.g.

Instrument (IF) is EAST.EY and the Currency = EGP

{
"fields": {
"customfield_10077": {
"value": "{{issue.customfield_10923.get(0).Currency}}"
}
}
}

 

This works

{
"fields": {
"customfield_10077": {
"value": "EGP"
}
}
}

 

But the value obviously needs to populate based on what the Asset Currency Attribute value is

 

2 answers

1 accepted

0 votes
Answer accepted
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jan 09, 2023

Hi @Karen Kelly 

What does the issue.customfield_10923.get(0).Currency return? Can you place it in the audit log?

Hello @Alex Koxaras _Relational_ 

 

O my goodness, thank you. it was returning the ID, so added .Name at the end and it is working!

Like # people like this
0 votes
Stephen Wright _Elabor8_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jan 09, 2023

Hi @Karen Kelly 

Just to confirm - for the select list...

  1. Does the option you're trying to set already exist within the select list?
  2. OR...are you trying to add a "new value" to the select list each time

If it's (1), it should be possible to make this work. Could you share what the rest of the rule looks like? And provide some examples of the select list options?

If it's (2), as far as I know this isn't possible using Automation. You might be able to do something using Web Requests, but it's not something I've seen done before.

Ste

Hello, @Stephen Wright _Elabor8_ 

I am looking at option 1.

The values are all already options in the Select list. 

The Select List options are all currencies e.g.

Screenshot 2023-01-10 at 07.15.07.png

Below is how the Instrument (IF) data is structured in Assets and displayed in the ticket. I am basically just trying to replicate the Currency Attribute in a field to use for something else. I can manually select the EGP option from the list or add it in the automation, but not get the value from this attribute to auto populate the select list.

Screenshot 2023-01-10 at 07.11.00.png

If I just try set a text field with this value it works though.

 

This is how the rule looks like

Screenshot 2023-01-10 at 07.17.14.png

 

Audit log:

Screenshot 2023-01-10 at 07.18.47.png

@Stephen Wright _Elabor8_ sorry found the error, needed to add .Name after currency attribute as Currency is also an object type

Stephen Wright _Elabor8_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jan 09, 2023 • edited

Hi @Karen Kelly 

Edit: Awesome, glad you found a way to do this :)

Ste

Suggest an answer

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

Atlassian Community Events