Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Creating issue - End Date field has to be greater than Start Date field

User is creating and issue and has 2 date fields....

Start Date and End Date - Is there a way to stop the user being able to enter an earlier date than the Start Date in End Date

3 answers

1 accepted

2 votes
Answer accepted

HI @Robert Bromley 

Yes this would be implemented as a validator on the create transition. 

Note to access the create transition you need to view the workflow in diagram mode and select the line from the grey circle. 

Depending on whether this is an on premise or cloud instance will then impact how you can compare the dates. 

Cloud

Screenshot 2021-04-21 135957.png

Screenshot 2021-04-21 140042.png

On Premise

To do date comparisons on premise you need to use a plugin here is an example using JSU

Screenshot 2021-04-21 140835.png

An alternative is to use Scriptrunner and base the script off the information at https://library.adaptavist.com/entity/calculate-the-difference-between-two-dates

This latter option gives you greater flexibility in terms of checking for a minimum gap between the dates for example or checking for the existence of both fields. 

Thanks Phil! Ill give it a go

Hi Robert,

it is possible to validate these date fields during the create transition. You must edit the workflow and add the "Date Compare Validator" validation to the create transition. Please see https://confluence.atlassian.com/adminjiraserver/advanced-workflow-configuration-938847443.html#Advancedworkflowconfiguration-validators.

Best regards, Lukas

Hi @Robert Bromley ,

 

We have opened a support ticket, https://beecom-products.atlassian.net/servicedesk/customer/portal/3/JSU-3493 to better track your request. However, we couldn't add you as a reporter. 

Please sign up using this link 
https://beecom-products.atlassian.net/servicedesk/customer/portal/3/user/signup and share the user name/id. We'll then add you as the reporter and confirm. 

Thanks,
Manisha

Hi @Robert Bromley ,

Please add the Date Compare (JSU) validator to the specific workflow transition.

val-jsu.jpg

Now, save and publish the workflow and rerun the scenario, if the End date is smaller than the Start date, you will see the error message. Please refer to the below gif file for details.

new- (1).gif

Please let us know if you face any issues.

 

Thanks,
Manisha

Like Phill Fox likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
7.13.1
TAGS
Community showcase
Published in Marketplace Apps & Integrations

Staying organized with Jira: best practices for a better project management

Project managers know this problem: A “mountain of work” lays in front of you, and you don’t know how and where to tackle them. Different to-dos lie ahead, but just one task after the other can be ha...

252 views 2 1
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you