Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Disable custom field based another another field value selection

Mandia July 1, 2018

For ex.

If I choose "Work Type Category" = Development or = Testing, then I will let everyone set values in "Planned Review Time". Else if I choose  other values then disable the "Planned Review Time".

I want to use sil script to implement this.

Could you please help me to let me know how to write the sil code?

Thanks,

Mandia

1 answer

1 accepted

0 votes
Answer accepted
Alexey Matveev
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.
July 1, 2018

Hello,

You can do it with Sil Live fields. First you need to connect a sil script to the Work Type Category custom field:

lfWatch("customfield_11100", {"customfield_10100"}, "hook.sil");

Suppose the id for Planned Review Time is 10100 and for Work Type Category 11100

Then you write the hook.sil:

if(argv["customfield_11100"] == "Development" || argv["customfield_11100"] == "Testing" ) {  
lfEnable("customfield_10100");
} else { 
lfDisable("customfield_10100");
}
 
Mandia July 2, 2018

Thank you very much!! It works on me!

Well, I have another question, 

for ex

When I create a subtask

If first time I set work type category = "Development" then I set Planned Review Time ="10"

But next time I set another value to work type category , then I want to clear the Planned Review time.(Since if I set work type category ="Development" then the "Planned review time" disabled)

I also want to use sil script to implement this.

Could you please help me to let me know how to write the sil code?

Alexey Matveev
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.
July 2, 2018

You can clear the Planned Review TIme like this:

lfSet("customfield_10000", "")

Mandia July 2, 2018

Thank you very much!! It works on me!

Alexey Matveev
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.
July 3, 2018

@MandiaYou are welcome. If my answer helped you, kindly mark my answer as accepted.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events