Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

I need to create a script to produce an error if you set an End Date before a Start Date

Edited

I have tried to create a Behavior for a field that creates an error and displays a message if I try to set an End Date before a Start Date. I've tried the script attached. It gives no script errors, but also does not work. This seems like a common thing, but I can't find a thread that has one that worksScreen Shot 2020-08-20 at 5.18.07 PM.pngScreen Shot 2020-08-20 at 5.16.39 PM.png

1 answer

1 accepted

Suggest an answer

Log in or Sign up to answer
1 vote
Answer accepted
Hana Kučerová
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Aug 21, 2020

Hi @James Breunig ,

The script is attached to the Downtime Start field, which means, that it is executed, after the Downtime Start field is filled in. When you create the issue, you probably first fill in the Downtime Start field, then the validator is executed, but the Downtime End field is empty, so nothing happens, and then you fill in the Downtine End field, but there is no validator set.

Could it be the possible explanation?

So maybe you could add the second validator to the Downtime End field, because you want to do the check every time one of the fields is changed?

I also believe it is not neccessary to have all the imports in the script. It should work without them.

Hi @Hana Kučerová

I've copied the script above into a server-side script for Downtime End. I've tried changing the order I fill them in. Still appears not to work.

Hana Kučerová
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Aug 21, 2020

That's strange, it works for me :-(

Just quick check - did you setup mapping for the behaviour?

Wow! That was it! I didn't know you have to pick a specific issuetype or it would not work. Thank you!

TAGS
AUG Leaders

Atlassian Community Events