ScriptRunner get ProForma values

Jesus Octavio Gutierrez Villegas
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 10, 2024

Hello everyone,

First of all, thanks for taking the time to read and answer :) I really appreciate it.


I was wondering if its possible to obtain the value selected by the user on my ProForma Forms in JSM so then I can trigger some actions with ScriptRunner such as assign issues for example.


In Automation, we know that we can obtain the ProForma values like this for example:

{{issue.properties."proforma.forms.i1".state.answers.43.choices.get(0)}}

I need to know if its possible to do this with ScriptRunner.
My case scenario is that I want to automatically assign issues depending on certain values of certain fields in my JSM form. 
I cannot accomplish this with Automation because there are a lot of values and a lot of "assignees".

any ideas?

Thanks again!

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Marcelo Ulloa
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 10, 2024

Hello,

Unfortunately, ScriptRunner can't directly access values from ProForma forms since these values are stored as issue properties, not standard Jira fields. While Automation can access these properties using smart values, ScriptRunner lacks this capability.

A possible solution is to first map the form values to custom Jira fields. Once the data is in standard fields, ScriptRunner can easily use these values to trigger actions like assigning issues based on the criteria you've set.

Jesus Octavio Gutierrez Villegas
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 11, 2024

yeah, Ive known that workaround but I was wondering if it was even possible without having to map them to actual fields.

Thanks!

Marcelo Ulloa
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 11, 2024

Hello @Jesus Octavio Gutierrez Villegas 

If you use ScriptRunner, it is the only way to access the data, there is no other way.
The other way is simply with native automations.

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events