condition on custom field

Umar Maroof
Contributor
December 25, 2022

I have two number custom fields in my project lets suppose 

num custom field 1

num custom field 2

I want to resistrict custom field 2 

like if I enter any number in custom field 1  so when someone try to enter the number in custom field 2 it is not greater than the double of the custom field 1 value.

for example if I enter  5 in custom field 1 then in custom field 2 we cant able to enter the number greater than 10..either its less than 10 or 10.

how can I achive this?

I am using jira cloud.

 

2 answers

0 votes
Justin Albers
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!
November 28, 2024

Hi @Umar Maroof ,

In case this is still needed:

you could create a rule that is triggered whenever customfield2 is being entered a value (trigger = field value changed).

In this rule, you put a condition (issue field condition) that only proceeds if customfield1 is greater than customfield2.

2024-11-28 12_57_37-Clipboard.png

In the next step you put a "Then:" (edit issue fields) and have it delete the value of customfield2 that was just entered.

2024-11-28 13_01_04-Clipboard.png

That should do the trick ;)

 

Best regards,

Justin

0 votes
Vamsi Kandala
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.
December 25, 2022

Hi @Umar Maroof

You can use 'Behaviors' if you have 'ScriptRunner' installed.

Thanks,
Vamsi

Umar Maroof
Contributor
December 25, 2022

@Vamsi Kandala  I dont have Scriptrunner. It cant be done by automation?

Vamsi Kandala
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.
December 25, 2022

Hi @Umar Maroof

You can install ScriptRunner and try.

Automation rules can be used only for checking after the transaction was completed like when the ticket was created.

Or, you can use 'Validators' in the workflow for the transition link connecting the 'grey' circle and the first status of the workflow ('Create' transition).

Thanks,
Vamsi

Coiram
Contributor
May 12, 2024

Not an answer @Vamsi Kandala if the user explicitly said "I do not have Script Runner" . . . because I have the same issue

Suggest an answer

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

Atlassian Community Events