Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to Create a Jira Validation Rule for Limiting Reservations?

a
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 3, 2024

Hello,

I’m currently working on a validation rule in Jira Service Management to manage reserved time slots for maintenance activities. The requirements are as follows:

1. Reserved Time Slot Validation: I need to limit reservations per date to a maximum of 5. If there are already 5 reservations for a specific date, the system should reject any new requests for that date.

2. Overlapping Time Check: I want to ensure that no new reservations overlap with existing ones. This means if a new reservation's start or end time overlaps with any existing reservation, it should also be rejected.

Currently, I am using an automated rule that calculates the reserved date field and replies to tickets if there's an overlap, but I’d like to set this up as a validation rule so that these checks are applied before a ticket is created.

I have tried using ScriptRunner and JWME (Jira Workflow and Miscellaneous Extensions), but I’ve run into limitations. Unfortunately, Jira expressions do not allow direct access to other issues and their fields, which is essential for determining overlaps across multiple tickets. 

Does anyone have experience with setting up validation rules for calendar-based scheduling constraints like these, or know of any workarounds that could allow cross-issue validation within Jira? Any guidance or examples would be much appreciated :)

1 answer

0 votes
Anusha A
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 5, 2024

Hi there, 

Thanks for your question on community. 

Unfortunately, this functionality is not natively available in Jira. You're correct in testing JWME and ScriptRunner, as these are the tools that can provide the level of validation you're looking for.

Currently, Jira doesn’t have built-in validation to limit reservations to a specific number of entries (such as 5 per date). The only available date-related validation is through a workflow validator, as discussed in the post here:

If you're looking for more advanced functionality, such as checking for overlapping reservations or limiting entries, using ScriptRunner would be your best option.

Hope this helps!

Regards,

Anusha A

Suggest an answer

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

Atlassian Community Events