Hi ,
I am trying to make a custom field mandatory based on the value of another custom field using SIL script.
if (argv["customfield_17000"] == "Digital ad" ){
lfShow("customfield_18600"); //Gifs or HTML5
lfShowFieldMessage("customfield_18600", "Field is required", "WARNING");
lfShow("customfield_18601"); //Maximum file size
lfShowFieldMessage("customfield_18601", "Field is required", "WARNING");
lfDisable("editSubmit");
}
lfWatch("customfield_17000", {"customfield_17000"}, "/path/SetSubtasks.sil");
But submit button is not getting disabled. Please help me to resolve this
Hello,
Could you change you script to this one and have a look in the atlassian-jira.log file, what value is for customfield_17000:
logPrint("ERROR", "customfield_17000" + argv["customfield_17000"]);
if (argv["customfield_17000"] == "Digital ad" ){
lfShow("customfield_18600"); //Gifs or HTML5
lfShowFieldMessage("customfield_18600", "Field is required", "WARNING");
lfShow("customfield_18601"); //Maximum file size
lfShowFieldMessage("customfield_18601", "Field is required", "WARNING");
lfDisable("editSubmit");
}
This script works on the Edit issue screen.
2018-10-31 01:56:41,800 http-nio-8080-exec-27 ERROR madhura.a 116x41794565x1 1rqn992 10.0.70.48,127.0.0.1 /rest/keplerrominfo/jjupin/latest/lf/event [c.k.s.lang.routines.LogPrintRoutine] customfield_17000Digital Animated ad
This is what i found on logs.
I want to disable create button in create screen. May be i will have to use different fieldname in this
lfDisable("editSubmit");
Do you have any idea what value i can provide in place of "editSubmit".
Regards,
Madhura
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Your script should be like this:
logPrint("ERROR", "customfield_17000" + argv["customfield_17000"]);
if (argv["customfield_17000"] == "Digital Animated ad" ){
lfShow("customfield_18600"); //Gifs or HTML5
lfShowFieldMessage("customfield_18600", "Field is required", "WARNING");
lfShow("customfield_18601"); //Maximum file size
lfShowFieldMessage("customfield_18601", "Field is required", "WARNING");
lfDisable("editSubmit");
}
If it does not work then try like this:
logPrint("ERROR", "customfield_17000" + argv["customfield_17000"]);
if (argv["customfield_17000"] == "Digital Animated ad" ){
lfShow("customfield_18600"); //Gifs or HTML5
lfShowFieldMessage("customfield_18600", "Field is required", "WARNING");
lfShow("customfield_18601"); //Maximum file size
lfShowFieldMessage("customfield_18601", "Field is required", "WARNING");
lfDisable("createSubmit");
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
lfDisable("createSubmit");
Changing it to createSubmit did not work :(
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could you try a script like this and make sure that there is the "inside the if" error message?
logPrint("ERROR", "customfield_17000" + argv["customfield_17000"]);
if (argv["customfield_17000"] == "Digital Animated ad" ){logPrint("ERROR", "inside the if" + argv["customfield_17000"]);
lfShow("customfield_18600"); //Gifs or HTML5
lfShowFieldMessage("customfield_18600", "Field is required", "WARNING");
lfShow("customfield_18601"); //Maximum file size
lfShowFieldMessage("customfield_18601", "Field is required", "WARNING");
lfDisable("createSubmit");
}
"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alexey Matveev,
Thanks for the reply.
I raised support request and got the solution. We should use lfDisable("createIssueSubmit") or lfDisable("issueCreateSubmit") depending from where we are accessing the screen
Thanks & Regards,
Madhura
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for letting know!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.