Working with scripted fields from scriptrunner

Stephan_Mallmann August 3, 2018

Hi folks,

i have a huge problem for me.
With my scriptrunner field "Escalation Level" I set an integer to a field which is count up on any time the escalation state is used. So if a new ticket is raised the field is empty. If you escalate once the value is 1 then 2 and so on. Now I create an automation which trigger on changing in this field. There is the first problem....

It never triggers

The second problem for me is that I use an If/else with a comparison condition to this field.
So if the field value is 1 I do some stuff and if the field value is 2 I do different stuff.

{{issue.customfield_10702}} 

This is the string I use for the condition

The problem there is that the condition is never true.

Can someone help me?

 

 

Best regards,

Stephan

1 answer

1 accepted

1 vote
Answer accepted
andreas
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.
August 5, 2018

Hi Stephan,

Unfortunately this wont work.  The scripted field causes problems when being access by Automation rules: https://codebarrel.atlassian.net/browse/AUT-879

We had a look at making this work, but unfortunately it's APIs deep inside Jira's JSON serialization that can throw errors so we can't listen for field changes.

I think for this scenario the best option would be the to do just do you if/else comparison with a ScriptRunner script. We're not expert on this, but I'm sure Adaptavist can help you out!

Another option might also be to increase the field with an Automation rule in the first place using our 'increment' function: https://docs.codebarrel.io/automation/smart-fields/math-functions.html

Cheers,
Andreas

Stephan_Mallmann August 6, 2018

Hi Andreas,

thanks for that quick response.
I change my configuration so that it is running 100 % with Automation 4 Jira.

Now it works fine for me :-)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events