Validate a date is not more than 12 months from now?

Karie Kelly
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.
February 27, 2013

I have a custom date field and I need to ensure that the user does not set a date that is more than 12 months from today. Does anyone have advice on how I might add that validator? We are JIRA 5.2.5

1 answer

1 accepted

0 votes
Answer accepted
Jobin Kuruvilla [Adaptavist]
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.
February 27, 2013

A Validator will help only if the field is used only on workflow transitions. If not, you will have to probably go for a new custom fielld type that does this validation.

Jobin Kuruvilla [Adaptavist]
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.
February 27, 2013

You can extend the default Date field and add the extra validation. Not sure if there is a plugin that already does this!

Karie Kelly
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.
February 27, 2013

Do you have a recommendation on any plugin that might assist with this new type as we would prefer that the issue not be created with an invalid date.

Any advice or suggestions are appreciated.

Karie Kelly
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.
February 27, 2013

I'll see what I can do with that. Thanks!

Suggest an answer

Log in or Sign up to answer