Forums

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

depends up the value in a select list field the Text field has to appear

Kumar
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.
November 12, 2018

Hi Team,

I'm Using a "Power script" runner plugin so i have a task that depends up on the value in a Select list custom field the Text field value has to appear on create and edit screen. I'm trying a script but its not workinh here is the script.

Power Scripts™ - Jira script automation

lfHide("customfield_10805"); //
lfWatch("customfield_10822", {"customfield_10822"}, "Hide Fields.sil");
lfInstantHook({"customfield_10822"}, "Hide Fields.sil");

if(argv["customfield_10822"] == "White-List") {
lfShow("customfield_10805");
}
else {
lfHide("customfield_10805");
}

and i have also smalll confusion by using this add-on .

can anyone please suggest me how to achieve this .

Thanks,

Kumar

1 answer

0 votes
Henrique Bittencourt
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 13, 2018

Hi Kumar! 

I just found an article that might help you achieve this!

Hope this helps!

Best Regards.

Kumar
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.
November 14, 2018

Hi @Henrique Bittencourt  thanks for your response i have tried that before but it didn't work.

Here I have tried 2 scripts and i have mapped to the project so every thing is fine here is the script below

 

//1) LiveScript.sil
lfHide("customfield_10914");
lfWatch("customfield_10913", {"customfield_10913"}, "JiraWork/HideFieldCCCR.sil", {"keyup", "change"});
lfInstantHook({"customfield_10913"}, "JiraWorkfolder/HideFieldCCCR.sil");

// 2)Hidescript.sil
if(argv["customfield_10913"] == "Yes") {
lfShow("customfield_10914");
lfShowFieldMessage("customfield_10914", " Field Address is required.", "WARNING");
}else{
lfHide("customfield_10914");
}

 The thing is the fields are working fine but the only thing is when i select a option "Yes" it will display a hidden field i'm selecting that field and creating ticket.

The only thing is the hidden field which i have selected is not showing in the created ticket and i tried in with doing edit also but still that field  is not showing on ticket. When You refresh it will showinh for 1sec and hiding.

can you please help me in scripting.

 

Thanks,

Kuamr

Suggest an answer

Log in or Sign up to answer