Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Populate multi-select custom field based on text in Description

Ida Giersing March 1, 2023

I'm trying to do something and can't get it to work – I was hoping you could help :) 

I need an automation that does the following: 

1. If the description of the issue contains the word "Danish" select "Danish (da-DK)" from a multi-select drop-down. 

2. If the description of the issue contains the word "Dutch" select "Dutch (nl-NL)" from the multi-select drop-down. 

Etc. with a bunch of other languages. But I need them to be accumulative. I've tried a few things and always end up with only the last listed language being selected in the multi-select. So it's like each step of the rule overwrites the previous one. 

I tried your first suggestion above, using the smartvalue {{issue.customfield_xxxxx}} and adding also the option to be added, but it doesn't work. 

Any tips?

Thank you!

2 answers

0 votes
Martin Svensson
Contributor
March 2, 2023

Hi Ida 

Great use-case i have a simular issue, but with solarwinds alerts.

I'm not really sure what you are looking for but have you tried anything like this?

 

{{issue.description.body.match(".*(Danish).*")}} as trigger

And Edit issue with your multi selection cf.

{

"update": {

"customfield_xxxxx" :{

"set " : "Danish (da-DK)" }

}

}

Ida Giersing March 3, 2023

Thanks for your response!
Can you clarify how to set {{issue.description.body.match(".*(Danish).*")}} as the trigger? Is that the same as picking a Condtition and selecting the Description and "contains" Danish? 

If I try that and then add your suggestion in the box under More options under Edit issue, the system tells me I can't use "update" but need to use 'add', 'remove', 'set' or 'edit' for that specific custom field. So I tried with "add" instead of "update", but I get the following error:

No fields or field values to edit for issues (could be due to some field values not existing in a given project)

 

Any ideas?

0 votes
Dave Mathijs
Community Champion
March 1, 2023

Hi @Ida Giersing , why not simply have the use select one or more values from the multi-select-drop-down directly instead of typing it in the Description field?

Ida Giersing March 1, 2023

Well – because of several reasons, I need the request to come in via a Google Form using Zapier – and that integration doesn't allow the direct population of the custom multi-select fields... But yes, that would of course have been the best way!

Suggest an answer

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

Atlassian Community Events