Need to find a way for Automation condition based on custom field options per project

Eli Albert
Contributor
December 17, 2024

Hi, 

We have a custom field named "module" with a list of different values per project context.

For example, in project "X" we have the options A, B, C, and for project "Y" we have B, C, D, in project Z we have C, D, E... etc.

Now, I need to create an automation that once an issue opened in one project, the condition will check on the "module" field value and will create (actually clone) the issue in all project that have this option in their context. 

i.e. if the original issue in project "X" has the value "B", the automation will clone the issue in "Y" project.

Is it possible? I'm struggling with the condition and I'm not sure if the condition can look after field available options .

Also, I can't do this "Hard-coded" with all existing options since the "module" field is constantly changing and new options being added to it.

2 answers

4 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 17, 2024

Hello @Eli Albert 

Is this for Company Managed projects or Team Managed projects? Are you using a globally defined custom field with Contexts, or a locally defined custom field within Team Managed projects?

I don't believe there is any native/simple Automation action for what you want to do.

I think the solution would involve using the Send Web Request action, perhaps multiple times, to make calls to the Jira REST API to get the Context information for the specified field , figure out which projects use the contexts, and figure out which contexts have a matching option value.

Eli Albert
Contributor
December 18, 2024

Hi Trudy :)

It's a company managed projects with different contexts.

I'll check the web request action you mentioned.

Thanks!

0 votes
Martin Spernjak
Contributor
December 17, 2024

Hi @Eli Albert , 

I recommend using the Lookup Table feature in Jira Automation.

The idea is to define a table that maps each module to its corresponding destination (project ID). Then, you can call a function that will retrieve the project ID from the table based on the module value.

Please see my example below for reference.

Picture1.pngPicture2.png

Picture 3.png

Picture 4.png

Please check and let me know if you have more questions. 

Regards, 

Martin

Eli Albert
Contributor
December 18, 2024

Hi Martin, thanks for your reply :)

I'm not sure that lookup table will work for us, as it's still kind of hard-coded solution, not dynamic

The module value list changes frequently and many new values ​​are added to it, so with each new value we will need to maintain the automation rule and update the lookup table.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events