How to restrict users from changing the status of issues with fields

I want to be able to stop moving an issue along a workflow if they haven't performed certain actions on it. I intended on creating a custom field check list, and the issue wouldn't be able to change status until all boxes were checked. Is there a way to do this/is there a different way I could do this?

2 answers

This widget could not be displayed.
Alexey Matveev Community Champion Dec 12, 2017

Hello,

I think it would be better, if you created a subtask for each option. I mean you do not need the custom field. On the creation of a task you would automatically create subtasks which have to be closed before the main issue could be transitioned to the next status. 

You can achieve this functionality with additional add-on like Adaptivist Script Runner, Power Script etc.

I think it would be a more transparent process. Because you can easily control who must do what and when it was done.

This widget could not be displayed.

Hey @Daniel Kendall,

I agree with Alexey that the better way of implementing this restriction is to do so using sub-tasks.

I'd also recommend using the Power Scripts add-on that he mentioned. There's a short video tutorial that walks through a very similar situation as the one you describe.

Here's a slight modification to the sample code used; feel free to customize to your needs:

/*Use this script as a workflow transition validator to allow transition only ifa field in the subtask is populated*/ string [] subtasks = subtasks(key);boolean hasInput = false;
string errorMsg = "This field is required";
for(string st in subtasks) {    if(isNotNull(%st%.fruit)) {        hasInput = true;    }}
if(hasInput(customfield_1234) == false) {

    return false, customfield_1234, errorMsg;
}

Hope this helps!

Thanks,

Johnson

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted yesterday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

79 views 1 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you