power scripts ver 6.820.1
I have a sil validator that checks for an invalid fix version
The error I am receiving "The getInput routine can only be used in validators or some post function"
However my script is a validator that is associated with a transition
Below is my script:
string errormsg = " please update to a valid delivery version"
string [] delivery = getInput(fixVersions);
if(issuetype == "DR){
if(contains(delivery ' "x" )){
return false, fixVersions, errormsg;
}
{
else{
return true;
}
Hello @Nannette Mori ,
where do you get this error message: "The getInput routine can only be used in validators or some post function" ? If it`s in the Editor console of the SIL Manager, that`s expected behavior. When you run it from SIL manager it is not applied as validator (even if you have this script somwhere configured as validator) and getInput routine gives you an error. But if you have this error in a different place - just let me know.
Also to make getInput working fine make sure that a transition screen has been attached to the current transition and that field Fix Version is present on that transition screen.
In addition, I see some syntax errors in your script, so I`ve fixed those:
string errormsg = "please update to a valid delivery version";
string [] delivery = getInput("fixVersions");
if(issueType == "DR") {
if(contains(delivery , "x" )){
return false, fixVersions, errormsg;
}
else{
return true;
}
}
Please try it out and let me know how it goes.
Anna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.