Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Getting error when trying to match a multiselect dropdown to Fix Versions

When trying to connect a custom multiselect dropdown field to the Fix version field via automation, I receive an error: Screen Shot 2021-02-02 at 5.46.34 PM.png

The Fix versions and the multiselect dropdown fields have the same values and are apart of the same project which is odd. I was able to automate these fields together when using a single field but needed to change the automation code to account for multi selections. 

Here is a screenshot of my automation set up: 

Screen Shot 2021-02-02 at 5.49.16 PM.pngScreen Shot 2021-02-02 at 5.50.04 PM.png

Any idea what the issue might be here? Thanks for any help in advance! 🙏🏼

2 answers

1 accepted

0 votes
Answer accepted
Darryl Lee Community Leader Feb 02, 2021

So, a couple of things.

1. If somebody selects multiple versions, this will probably break, because you'd potentially be trying to set the field to:


2. I don't think you need the full {{/changelog.customfield_10050}}. {{/}} should do.

But anywho, I think what you need to do is:

    "fields": {
        "fixVersions" : [ {{#changelog.customfield_10050}} { "name": "{{fromString}}" }{{^last}} , {{/}} ]

This code is untested. For debugging purposes, I always recommend adding an action to write to the Audit log. I would throw the whole "fixVersions..." line in there.

Thanks for the response, Darryl! Ya, I've been noticing some odd behavior when doing multiple field selections. 

When entering your code above, then attempting to publish changes, I got the following error: 

Error while parsing additional fields - Failed to close 'changelog.customfield_10050' tag

I think it has something to do with:  

{{^last}} , {{/}}

 When I removed the {{^last}} , it seemed to get rid of the error but still no dice with the automation. 

Darryl Lee Community Leader Feb 02, 2021

AUGH, I forgot an extra {{/}} closing tag that was messing me up for while, then I remembered this discussion:

Which led to this bug:

And this one:

In summary: {{changelog}} is kinda borked for multi-select fields. HOWEVER, I think {{fieldchange}} will work. I was at least able to get the values out. Let me see if I can tweak it to actually generate usable JSON...

Eh, I got close, but no cigar.


Will return: 5.1,4.0

But as previously mentioned, your data needs to be in this format:

[{ "name": "5.1" },{ "name": "4.0" }]

So I tried what sounded like a perfect function:


But that gave me nothing. I thought it might be because toString was returning a string. Ok fine, so I tried:


That returned a more promising:

[10081, 10082]

But when I tried to feed it to asJsonObjectArray, still nothing. (Oh, and to @Nic Brough _Adaptavist_'s point, those are option values, not actual names of options, so even if I ended up with a proper JSON Object Array, the values would be all wrong.)

I'm getting the sneaking suspicion that fieldchange is not like other fields. :-{

To complete my futile journey, I tried one more horribly hacky thing:

"fields": {
"fixVersions": [ "name" : "{{fieldchange.toString.replaceAll("," , " \" \"name\" : \" ")}}"

The thought here is that I could use a text function to insert the necessary JSON tags and formatting. But... nope.

So, in summary.... I think I need to file a bug.

Also, how did I get this weird font? Huh.

Darryl Lee Community Leader Feb 02, 2021

Wait. I'm an idiot. We don't need to bother with fieldChange or changelog at all.

Because your field will already have been changed when the Automation is triggered, you should be able to use:


Maybe that will work with one of the aforementioned functions. Let me give that a whirl.

Darryl Lee Community Leader Feb 02, 2021

Bam. That did it. Try this:

    "fields": {
        "fixVersions" : [ {{#issue.customfield_10050}} { "name": "{{value}}" }{{^last}} , {{/}}{{/}} ]
Like Bill Sheboy likes this

Darryl! This is awesome. It works for me now. Thank you so much for the help and effort you put into this 🙏🏼

Gonna keep testing on my end but all seems to be good to go :) 

Like Darryl Lee likes this

I am finalizing this automation flow and am running into a final issue which I posted here for anyone that might have a similar use case. 

Like Darryl Lee likes this
0 votes

I think this is the problem:

"The Fix versions and the multiselect dropdown fields have the same values"

They do not.  They might have the same text in their names, but the fields contain different values.  A version field contains a version object, and a multiselect list contains one or more option objects.

To compare them, you'll need to code for looking at their names, not just the values.

Suggest an answer

Log in or Sign up to answer
Site Admin
Community showcase
Published in Apps & Integrations

Send an Email or Publish to Confluence - What should you do with your release notes?

Background When you hear the words ‘Release notes’, almost always you think of an unsolicited email from a software vendor. But I am here to tell you that from our data, sending release notes via E...

124 views 1 2
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you