I am using issues as asset reservations in a Jira project. Each issue is a reservation booking, and has a start and end date/time, and two fields that allow multi-select of two different assets types (location and equipment).
I'd like to create a custom Issue Collector that, as the Start & End date/time and assets fields are changed, an Ajax call is made that returns true/false if there's an time overlap with an existing issue, when any of the assets are the same. If an overlap exists, it would expose an error message (DOM container) on the issue collector modal identifying which asset(s) are unavailable, and disable the submit button. This effectively would add collision-detection when booking a reservation, so that resources wouldn't be double-booked.
How would I go about this? Is there an API that can used to send several fields from the Issue Collector to Jira, and is there a function on server/data-center do an exclusive date-range check?
Note that the page where this Issue-Collector is invoked is an external website, and I'm already fetching multiple iCal .ICS files (one for each asset) from the Confluence Team-Calendars API, which I use to populate my own FullCalendar instance on that page. So although I think using an Ajax call to Jira would be less prone to chancing a booking is made against stale data, it might be useful since date-range data is already local to that external page. On the other hand, Issue-Collector runs in an iFrame, which makes it difficult to trade data from the local JS env.
Spend the day sharpening your skills in Atlassian Cloud Organization Admin or Jira Administration, then take the exam onsite. Already ready? Take one - or more - of 12 different certification exams while you’re in Anaheim at Team' 25.
Learn more