Hi everyone,
Is possible to block the insertion of date before the current one?
For example: Today is 04/06/2018 and the user tries to put 04/05/2018. The jira should show that the date before the current date is not allowed.
Thanks,
Fabio.
Hello @Fabio Manzoni
You can implement a check in the "validation" phase. If the user is entering the date on the create screen then you can add a check in the "validation" phase of the workflow transition that the date should not be less than the current date.
Tarun,
Thanks for answer.
Do you have an example code?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Out of the box you can't have it, I use the script runner plugin for implementing such features.
Samples here
You can easily get the value of the date using customFieldManager then convert the value to an Date object and then compare it with today's date.
How to work with dates in groovy
http://mrhaki.blogspot.nl/2009/08/groovy-goodness-working-with-dates.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.