How Do I Restrict Date Selection to Allow only 2 Weeks from Today and On?

Henry Choi November 9, 2023

We have an employee onboarding form that requires 2 weeks notice of the employee's start date but customers have been picking any date they want. 

How can I set it up so that the customer filling out the form can only pick dates after 2 weeks from today and grey out the rest or produce an error?

2 answers

1 vote
Kian Stack Mumo Systems
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 9, 2023

@Henry Choi

 

Try putting a validator on your workflow that uses the Date Compare Validator.

 

Screen Shot 2023-11-09 at 2.06.03 PM.png

 

That worked for me.

0 votes
Albert Marti November 13, 2023

Hi @Henry Choi , had a similar problem, and I didn't find a way to restrict the date users can pick when creating the ticket through the portal.

What we did, however, was add an automation rule that, if the due date set violates the range you want (<2 weeks in the future) it automatically changes the due date to the minimum amount required and warns the customer of the change and the reason.

Henry Choi November 14, 2023

How did you set up the logic to do that?

Albert Marti March 18, 2024

Hi again @Henry Choi , sorry for the late reply. Here it is:
I created a custom field to store the SLA days per user request, that is automatically set, let's say at 10 days.
Then the main automation rule goes:

If
   {{issue.duedate}} is less than {{now.plusBusinessDays(issue.customfield_XYZ)}}

Then
   Edit issue fields - Due date
   {{now.plusBusinessDays(issue.customfield_XYZ)}}

And: Re-fetch issue data

And: Send email
   Reporter
   Due date of {{issue.key}} has been updated

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events