Booking System

Create booking requests and booking workflows in order to avoid Environment usage conflicts.

Context

You have defined your Environments and you would like people to book your Environments for different kind of activities like UAT, demos, technical maintenance, etc.

Prerequisite

Your Environments are already defined in Apwide Golive. Not yet? Follow our Quick setup

Let's go!

For this use case, we are relying on Jira core features: Jira issue types, Custom Fields, Workflows, etc.

1. Create a new Jira Issue Type to support your Environment Booking requests

For instance, you can name it “Booking Request”. Associate your newly created Issue Type with an existing Jira Project, or create a new Jira Project to be used for your Booking Requests (it’s up to you).

2. Create an Environment Custom Field (or reuse existing one)

Create a Golive Custom Field to store the Environments linked to your Booking Requests. You can name it “Environment(s) to book” and add a link to a shared Timeline where you will show all Booking Requests.

You cannot update the field description once it is created. If you need to change it, you will have to create a new custom field.

Create an Environment Custom Field

Related Golive Cloud documentation Create an Environment Custom Field

3. Create Jira Date Custom Fields (or reuse existing ones)

Create two Jira Custom Field of type “Date Time Picker” to store the beginning of your Booking Requests. (you can name it “Start time”) and the end of your Booking Requests (you can name it “End time”).

CreateJira Cloud Custom Fields

Related Golive Cloud documentation How to create a Jira custom field?

4. Create a Screen for your Booking Request Issue Type

Add the fields you defined in STEP 2 and 3 in your new screen. It should look like this:

Configure a new screen for your Booking Request

Related Golive Cloud documentation How to create and activate a screen?

5. Create a workflow for your Booking Request Issue Type

The workflow is really up to you, you can add as many steps and approvals as you need. Here is an example of very simple workflow:

Create a workflow for your Booking Request

Related Golive Cloud documentation How to create and activate a workflow?

6. Test your Booking Request

From your Jira Project, create a new Booking Request and make sure it works. Adjust if needed.

Test your Booking Request

7. Create a Booking Requests Calendar

Create a new Golive Timeline (more info: Timelines) Add a new Issue Calendar by typing “Booking Request” (or the name you choose for your Issue Type):

By default, all Calendar information should be there. Double-check the fields mapping to make sure they are the Custom Fields you have created before.

Create your Booking Request Calendar

After clicking on “Done”, you should see the Booking Requests on your Timeline, with their statuses.

Your Booking Request system is ready!

Conclusion

Congrats! Now you have a Calendar displaying your Booking Requests and their statuses.

You can reschedule your Booking Requests on the Timeline with drag-and-drop: the “Start time” and “End time” will be updated and the requester will be notified by Jira.

You can also move the Booking Requests from one Environment Swimlane to another in order to update the Environments booked by the request. Notification will also be sent to the requester.

Conflict Management with Jira Automation

Go further and list booking conflicts in your Booking Request with Jira Automation. Each time Booking Requests are created or updated, we link them with conflicting Booking Requests:

Booking Requests are automatically linked with conflicting requests

Create a new Automation Rule in Jira Settings -> Issues -> Issue linking

Add a new Issue Link Type in your Jira setup

2. Create a new Automation Rule

Create a new Automation Rule in Jira Settings -> System -> Automation Rules

Create a new rule for your Conflict detection

3. Trigger: Field value changed

Monitor your custom fields for "Create issue" and "Edit issue"

4. Condition 1: Booking Request issue type

Limit the execution to your "Booking Request" issue type

5. Conditions 2/3/4: Fields are not empty

Let's ensure that all 3 fields to be used are filled in. For each of them, we use a "does not match regular expression" condition.

Start time
End time
Environment(s) to book
Start time
{{issue."Start time"}}
// does not match regular expression
(^null$|^$)
End time
{{issue."End time"}}
// does not match regular expression
(^null$|^$)
Environment(s) to book
{{issue."Environment(s) to book"}}
// does not match regular expression
(^null$|^$)
"Start time" should no be empty
"End time" should no be empty
"Environment(s) to book" should no be empty

6. Lookup issues: search for conflicts using JQL

Use a JQL query to search for conflicting Booking Requests

Here is our JQL using smart values, feel free to adjust it to your needs.

type = "Booking Request" AND key != {{issue.key}} AND "Start time" < "{{issue.End time.jqlDateTime}}" AND "End time" > "{{issue.Start time.jqlDateTime}}" AND "Environment(s) to book" IN ({{#issue."Environment(s) to book"}}"{{value}}"{{^last}}, {{/}}{{/}})
We remove all existing linked issues

8. If lookupIssues is not empty

We check if there are some conflicts found in step 5
If we found conflicting Booking Requests, we link them the "overlaps with" link

Questions?

Jira is very powerful for its workflows, that’s why we have decided to rely on it for our Booking System, instead of implementing our own system. The setup may be a little complex for Jira beginners, that’s why we offer free assistance for this configuration.

If you need our help, contact us.