Forums

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

Run a validator only on issues created after a certain date

Penny H-D August 18, 2023

I want to have a validator run on issues created after a certain date.    I have tried adding a condition to the transition but that would prohibit issues created before the date from being able to be transitioned (not what I need).

If Issue created >= 2023-01-01 00:00 then run validator else allow transition

1 answer

0 votes
Robert Wen_Cprime_
Community Champion
August 18, 2023

Hi @Penny H-D ! Welcome to the Atlassian Community!

Basically, a validator checks for something to allow the transition.  What you're asking for in your validator is that the issue was created after a certain date?

There is not a validator available out of the box that looks at a single date field.  Perhaps you might need to look at a Marketplace App?

Penny H-D August 18, 2023

The validator would check some custom fields for completeness.  I have some mandatory fields on creation of an issue but it seems cloning older issues from prior to the fields being added is allowing for the new fields to not be "completed" (they are marked as none).

I was hoping that field configuration of required would have also made the mandatory fields required when in view/edit but that does not seem to be the case as I have tested changing description, acceptance criteria and other data points and have not been promoted for the mandatory fields - wondering if None is an "acceptable" value thus satisfying the required rule?  Is there a way to set default to blank/null?

I want the validator execution to be the "yes" path of a date condition.  I don't want the validator to run on older issues, only on issues from a certain date to the present.

Cassie the Jira Mechanic
Community Champion
August 18, 2023

@Penny H-D when you say "some mandatory fields on create" are you referring to checking them on the workflow? It sounds to me like that might be the case. If you use a field configuration, then even if you clone or move an issue you should be required to fill that field in. Usually if a field is required in this way "None" is not an option unless you created it as one manually (thats what leads me to believe you may not have used a field configuration) Here is information about those.

That being said you can run a Scheduled automation and make the JQL look at a date field like created date or updated date and then that also has the requiredfield IS Empty

something like this: 
jql.JPG

Penny H-D August 21, 2023

RE:  "some mandatory fields on create"  meaning I have field configuration of required on the create workflow -  yes.   

Attached are screen shots of field configuration and field defaults.  The field is marked required, the option of None still appears, cloning of issues where the value is None does not prompt for the value to be updated.  None seems to be accepted as a valid value to satisfy the required rule.  I also did not add None as an option.

Scheduled automation - I don't want it to run at a certain time of the day, the mandatory field should be checked during edit/transition but it is not behaving in the anticipated way.  

I wanted to add a validator as I don't see an option to provide a screen prompt on automation rules.

Picture1.pngPicture2.pngPicture3.png

Cassie the Jira Mechanic
Community Champion
August 21, 2023

@Penny H-D Looking at yours it appears there is not a default value.  This will remove the ability to have "None".  The only way out-of-the-box for Jira Cloud to remove "None"  is to mark the field as Required and with a Default Value.

Hope this helps!

Penny H-D August 22, 2023

So it seems the required field not "validating" on edit of issue is working as designed.  IMHO, bad design.   See this article.  Required field only working on create not update of issue 

 

In doing some more digging I found this Wanted to add condition for validator.  Going to give this a try and see how it goes. 

Thank you all for your time and expertise.  I enjoy reading the questions and answers from this community...so much knowledge shared is a beautiful thing.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events