I am working on creating a workflow validator when transiting a story to Done. I need to require the custom Story Points field to be filled out.
if (issueType=="Story") {
if (hasInput("customfield_10106")) {
return true;
} else {
return false, "Required Field: Story Points.";
}
}
Using SIL Scripts I was able to get this Validator script to work but it works to well. There is a problem, this screen popup to update required fields before moving to next status, but once these required fields are updated even though after updating these required field whenever again we have to move to that transaction again that screen popup even though those required fields are updated.
Hi @Lindsay Edwards ,
Welcome to Atlassian community!
Why you are using script for this, It can be achive by the Jira inbuild function.
Simple you need to add one validator for requried field.
Regards,
Sanjen
I tired that also:
string errorMsg = "Please input Story Point Value.";
if(!hasInput("customfield_10106")) {
return false, "customfield_10106", errorMsg;
}
}
It gave me the same issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Lindsay Edwards ,
Can you please share the screenshot, What was the error you are getting..?
How you are adding..? As per my understanding, you can normally, select the story point field requried then it will apply in the workflow.
Regards,
Sanjen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thankfully I was able to figure it out with some help from a coworker.
if(issueType == "Story"){
if(isNull(%key%.#{Story Points}))
{
return false, "Required field: Story Points";
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Lindsay Edwards ,
Great 👍
It will better if you accept the answer then other people will get the proper solution by the help of your answer.
So Don't forget to hit the answer button.
Regards,
Sanjen
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.