Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Workflow Validator for Required Field

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.

 

1 answer

0 votes
Sanjen Bariki
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.
Nov 14, 2023

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.

Sanjen Bariki
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.
Nov 14, 2023

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

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";
}
}

Sanjen Bariki
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.
Nov 14, 2023

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

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
9.4.8
TAGS
AUG Leaders

Atlassian Community Events