Note : I don't want to make a field mandatory during a status transition , but when it is on a particular status .
For eg : Status = In Progress , Custom field is optional
Status = Pending , Custom field is mandatory
Do you mean, once ticket transition is completed to Pending, if ticket is edited, certain custom field is mandarory due to status = Pending?
Hi Shivi,
A status transition and saying once a field moves into a particular status is the same thing.
You should put a Validator on the transition to the Pending status to make the field required.
Yes ...I meant the same
I don't think its same ..
For E.g. : If from To Do -> In Progress , only user can move it and the issue assigned to is a developer , So he will be responsible to fill out that custom field which I want to make mandatory . If I put validator only that transition , user will be asked to fill out that mandatory field , while I want developer to fill that field .
Ok, if this is the case, I think you accomplish this with a Behaviour script.
You can read about them here
https://scriptrunner.adaptavist.com/latest/jira/behaviours-overview.html
If I have a chance I will give you the idea of the script tomorrow
That's different information that what was in the question - thank you for the clarification.
How will you know if the user is a Developer?
Here it is an example of Behaviour script
def cf_status = getFieldById("status")def cf_field = getFieldByName("yourfieldName")
String status = cf_status.getValue()
if (status.equalsIgnoreCase("Pending")) {cf_field.setRequired(true)}
else {cf_field.setRequired(false)}
Hi @John Funk
User is a different role and Developer is different . The status transitions are restricted according to the user roles and permissions .
It looks like you're new here. Sign in or register to get started.