check that DueDate is not empty

Hi, can I add a transition validator/simple script to check the project and then DueDate?

Something like 

project == 'foo' and issue.DueDate is not EMPTY

If the above condition was met, then there would be an error stating that the duedate was required for this project.  I am trying to avoid having multiple workflows ... 

Was trying to do this with the simple scripted validator, but not having much luck.

 

Thanks in advance! 

5 answers

This widget could not be displayed.

Hi Paul,

Using JJUPIN plugin you can write a validator as simple as this: 

if(isNull(dueDate)) {
   return false, "duedate", "Due date should not be null!";
}

The result would look like this:

Capture.PNG

 

I hope this helps,
Alexandra

This widget could not be displayed.

Thanks Alexandra, unfortunately getting new plugins is a slow process, is there anyway I can just write a JQL query to use in the simple script section that's available by default?

This widget could not be displayed.

If all you want to do is make the field mandatory, you can set it as required from the project administration, but that would make the field mandatory for all the projects. 

This widget could not be displayed.

Yeah, I would have to have custom field scheme for this one project to do this?

I have tried to stay organised and have only a couple of schemes and workflows across all my projects.

Changing this in the field scheme would make it mandatory for all my projects I think?

 

This widget could not be displayed.

Yes, it would make it mandatory for all the projects.


As I have seen here: https://confluence.atlassian.com/display/JIRA060/Specifying+Field+Behaviour, you may have multiple field cofigurations.

So, you can create a new field configuration scheme and a new field configuration. In the field configuration you should due date required. Now, all you have to do is to use the new field configuration scheme for the project in case.

 I have tried this, it works. smile

This is my last idea - I have seen though you don't want many schemes... 

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 8 hours ago 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...

21 views 0 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