Skip to main content
Skip table of contents

Conflict Checker

The scheduling configuration has been improved as part of Golive 9.23. If you are using Golive 9.23 or a newer version, please refer to the Scheduling Environments section. If you are using an older version of Golive, consider upgrading. Alternatively, you can refer to the documentation below for configurating your environment scheduling.

When you book an environment, you need to make sure you are not booking it on the same timeslot than a colleague. In our basic use case, we rely on the Timeline to visualize potential conflicts. If you want to go further and highlight or block conflicting booking requests, read further…

Highlight Conflicts with Jira Automation

You can list potential booking conflicts in your Booking Request with Jira Automation. Each time Booking Requests are created or updated, we link them with the other conflicting Booking Requests:

Booking Requests are automatically linked with conflicting requests

1. Create a new "Overlap" Link Type

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

And implement the following automation steps (detailed in the paragraphs below):

Steps required in your automation

3. Trigger: Field value changed

Define your trigger

4. Condition: Booking Request issue type

Limit the execution to your "Booking Request" issue type

5. Delete existing "overlaps" issue links (x2)

You have to create two "Delete issue links" steps, one for the first "overlaps with" and one for the second one, because Jira does not let you select both of them in the same step.

6. Conditions: 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

We make sure the “Start time” field is not empty.

First value (replace “Start time” with the name of your date/time custom field, if different)

CODE
{{issue."Start time"}}

Regular expression

CODE
(^null$|^$)

End time

We make sure the “End time” field is not empty.

"End time" should no be empty

First value (replace “End time” with the name of your date/time custom field, if different)

CODE
{{issue."End time"}}

Regular expression

CODE
(^null$|^$)

Environment(s) to book

We make sure the “Environment(s) to book” field is not empty.

"Environment(s) to book" should no be empty

First value (replace “Environment(s) to book” with the name of your environment custom field, if different)

CODE
{{issue."Environment(s) to book"}}

Regular expression

CODE
(^null$|^$)

7. 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.

SQL
type = "Booking Request" AND key != {{issue.key}} AND "Start time" < "{{issue.End time.convertToTimeZone("UTC").jqlDateTime}}" AND "End time" > "{{issue.Start time.convertToTimeZone("UTC").jqlDateTime}}" AND "Environment(s) to book" IN ({{#issue."Environment(s) to book"}}"{{value}}"{{^last}}, {{/}}{{/}})

If your Jira Cloud "Default user time zone" is not UTC time zone, you have to update the JQL query to match your Jira Cloud time zone.

You can find your Jira Cloud time zone in System > General configuration > Default user time zone. And here is the list of corresponding time zones to be used in your query.

For instance, for "Europe/Zurich" time zone, you should update the query as followed:

"Start time" < "{{issue.End time.convertToTimeZone("Europe/Zurich").jqlDateTime}}" AND "End time" > "{{issue.Start time.convertToTimeZone("Europe/Zurich").jqlDateTime}}"

8. If lookupIssues is not empty

We check if there are some conflicts found in the previous step

CODE
{{lookupIssues}}

9. Link issues

If we found conflicting Booking Requests, we link them the "overlaps with" link

CODE
{{lookupIssues}}

In order to work as expected, your "Link issue" action should be within your If block:

10. Conflict Checker for Dependent Environments (optional)

For your Booking Requests to automatically book dependent environments, you can follow this guide: Auto-Book Dependent Environments

If you would like your Conflict Checker to also highlight conflicts with dependent environments after you have configured the Auto-Book Dependent Environments, you need to perform 4 adjustments to your “Conflict Checker” Automation rule:

Steps to amend are highlighted in yellow

Trigger: Field Value Changed

Add you Dependent Environments as a Trigger Field.

Create variable action

After your conditions, add a “Create variable” action that will append the “Environment(s) to book” and the “Dependent Environments” fields values.

Variable name

CODE
bookedEnvironments

Smart value

CODE
{{#issue."Environment(s) to book"}}"{{value}}"{{^last}}, {{/}}{{/}}{{#issue."Dependent Environments"}}{{#first}}, {{/}}"{{value}}"{{^last}}, {{/}}{{/}}

Log action

After the “Create variable” action, we log the “bookedEnvironments” variable to help us with the debugging.

Log message

CODE
bookedEnvironments: {{bookedEnvironments}}

Update the Lookup issues

We update the JQL in the “Lookup issues” action in order to use the new variable.

JQL

SQL
type = "Booking Request" AND key != {{issue.key}} AND "Start time" < "{{issue.End time.convertToTimeZone("Europe/Zurich").jqlDateTime}}" AND "End time" > "{{issue.Start time.convertToTimeZone("Europe/Zurich").jqlDateTime}}" AND ("Environment(s) to book" IN ({{bookedEnvironments}}) OR "Dependent Environments" IN ({{bookedEnvironments}}))
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.