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
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Karen Kelly
Just to confirm - for the select list...
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello, @Ste Wright
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.
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.
If I just try set a text field with this value it works though.
This is how the rule looks like
Audit log:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Ste Wright sorry found the error, needed to add .Name after currency attribute as Currency is also an object type
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.