Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

how to bypass required field check in automations?

Renni Verho
Contributor
December 22, 2022

Hi, 

 

We use scriptrunner and jira project automation. 

Is there way to bypass required field check in automations ?

 

 

2 answers

0 votes
Bill Sheboy
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.
December 22, 2022

Hi @Renni Verho 

What problem are you trying to solve by doing this?

There is likely a different problem your team/organization was solving by making those fields required.  Circumventing that may create other challenges, or re-introduce the original problem the required fields solved.

Kind regards,
Bill

Renni Verho
Contributor
December 23, 2022

Hi @Bill Sheboy 

 

We can use inactive assignee as example. We have automation to re-assigne issues to project lead if assignee comes inactive. 

This automation should not check required field in this phase as new assignee will take care of those later.

Regards, 

Renni

Bill Sheboy
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.
December 23, 2022

Hi, Renni!

In your example, is assignee a required field?  Or...are you noting that:

  • fields have been made required after an issue was created (with empty required fields), and...
  • during assignee clean-up (for the inactive user) the required fields are blocking the update?

If so, this seems like an opportunity: whenever a field changes to required, search for and update all empty values to set them.  That will keep the information as current as you wish.

Renni Verho
Contributor
December 30, 2022

Hi Bill, 

 

In our case there is some fields (variates project by project) which are set as required 

eg.  INT project decided to set Fix Version/s required and that is now blocking the update. 

Your proposal would be ok in case there is one suitable selection, but often is better that project lead does those updates and that's why idea was to change assignee to project lead. 

Based on responses I see we must handle these in another way (maybe manuall mass assigning  to projet lead to make sure fields are filled). Automated handling of these cases in big company would save a lot of time. 

 

Br, 

Renni

 

Bill Sheboy
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.
December 30, 2022

Thanks for that information, Renni.

If you think about this like a data-centric analyst, when a customer asked to make a field required and there was existing data, the analyst would query, "how do you want to handle any currently empty, but now required, fields?"  Otherwise the condition you noted with your original question is created.

As you note the required fields are project by project, a good approach may be to divide and conquer: each project admin can survey their required fields, run a quick JQL search to identify the impacted issues, and then decide next steps.

0 votes
Filipi Lima
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 22, 2022

Hi, Renni,

While I'd personally advise against creation such exception as it breaks the purpose of having a required field, one solution I've seen for similar scenarios was to create a separate workflow transition only accessible for the automation user and/or a few admins where the fields are not required.

My recommendation would be to define values for the "required" fields that could be provided by the automation.

With Scriptrunner you could add a behavior to the field, but I'll leave the specifics for someone with more experience on that, if you'd like to go that route.

Cheers!

Suggest an answer

Log in or Sign up to answer