Scriptrunner how compare 2 numbers field if it is different, do not open an issue

Fernando Passos April 5, 2022

Hi guys.

Can you help me?

I Would like compare two number field (Valu_A) (Value_B) if it is different, do not open an issue.

Its possiblle? I usually use Scriptrunner...

Thanks.

1 answer

1 accepted

0 votes
Answer accepted
Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 8, 2022

Hi @Fernando Passos ,

you can do that by a custom scripted validator on creation in your workflow.

Add a validator "Simple scripted validator [Script Runner]" with the following code :

cfValues['Custom Field A'] != cfValues['Custom Field B']

Please add field names at your convenience.

It should work,

Fabio

Fernando Passos April 11, 2022

It worked perfectly, thank you very much @Fabio Racobaldo _Herzum_ .

Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 11, 2022

you're welcome @Fernando Passos  ;)

Like Fernando Passos likes this

Suggest an answer

Log in or Sign up to answer