Hi,
I have used the below script for ensuring Fix Version field is filled while moving an issue from READY TO ACCEPT to ACCEPTED status
def fixVersions = issue.getFixVersions();
if (fixVersions == null || fixVersions.isEmpty())
{
errors.add("Fix Version is required to accept this ${issueType}")
}
How do I make this script to include TEST issue types as well. Please help. Thank you
Hi @Aisha M ,
You can use this line to check issue type id.
if(issue.getIssueTypeId().equals("10000")){
//
}
Regards
@Tansu Akdeniz Thank you for the comment;
I know the issue type ID. Can you please help me with how to ensure that Fix Version is filled in while moving a TEST issue type from one status to another. In my case, READY TO ACCEPT to ACCEPTED
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In the workflow, you need to put this validator to READY TO ACCEPT to ACCEPTED transition in order to make fix version required for test issuetype.
import com.opensymphony.workflow.InvalidInputException;
if(issue.getIssueTypeId().equals("10000")){ //TEST issue type id
def fixVersions = issue.getFixVersions();
if (fixVersions == null || fixVersions.isEmpty())
{
invalidInputException = new InvalidInputException("Fix Version is required to accept it");
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Tansu Akdeniz Thank you. Will check it out.
Also, do I need to add the inclusion to the existing code ? Or add a new one.
The reason is because, by usual all our other issue types go through this process and Fix Version is mandatory for moving the issue to the ACCEPTED status. So, want ot make sure the other issue types don't get affected
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.