Forums

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

Automation to fix the Compass Component problem

The introduction of Compass Components for Jira Cloud created significant headaches for many of us Jira Admins. This article provides a Jira Automation rule to automatically fix a problem likely affecting every organization using Jira but not Compass.

Background

As of Q3 2025, Jira Cloud teams can easily find themselves unable to use their Jira Components. If their org doesn't have the Atlassian Compass product, then a Project Admin might click the toggle shown below in the "Components" section of their Project:

        CompassSwitch.png

At that point everyone in the Project loses access to Components. The Components page changes to just show links to "Learn more..." and "Try Compass free". If the Project Admin works hard enough, they might find the confusingly labeled toggle to switch back.

In our organization I found 20 teams within 6 months of switching to Jira Cloud that had gotten themselves stuck like this. Some of the teams might not have realized the problem, others just were apparently quietly living with having no more access to their Jira Components. I call this "negative business value".

Automation Solution

Since teams could find themselves unknowingly stuck at any time with this problem, I needed a solution to get them unstuck automatically. Jira Automation Rules and the REST API to the rescue.

You can download my rule below, import it into your Jira Cloud, update a few components, test it, and then forget about this problem.

The rule runs twice per weekday and checks every non-archived Company-Managed Project in Jira Cloud. If it finds one with the "Compass Components" toggle set to ON, then it toggles it back to OFF. It updates the Audit Log with the Project Key for any projects that it fixes.

The rule takes ~25 seconds to scan our ~300 projects.

To Use This Rule

You must be a Jira Administrator to perform these steps.

  1. Copy the Rule JSON at the bottom of this article, paste it into a text editor (not Word!) and save it as a file named rule.json
  2. In Jira Cloud go to "Settings > System > Global automation".
  3. In the top-right 3-dots menu select "Import rules", click "Upload JSON", and specify your rule.json file. Check the box for this rule, but leave the "Import rule owners" box unchecked. Leave "Restrict to projects" blank, as this needs to be a Global rule. Click "Next" to import the rule. If this fails, compare your .json file to my JSON below for accuracy, maybe play with line terminators, and retry.
  4. Once the rule is imported, you'll need to edit it. The rule will NOT work without a few updates. Ensure your Scope is set to "Global rules". In the "Actions" menu for this new "Clear Compass Components" rule, click "Edit".
  5. There are four (4) "Send web request" components. All of them need the same edit: delete the "Authorization" header and add a header with Key = Authorization and Value = "Basic AUTHSTRING" (see below). For best security, check the "Hidden" box. Update all four.
  6. The rule was written in the U.S. Central Timezone to run at 6:30am and 12:30pm. You'll likely want to adjust those UTC-based hour settings in the Trigger.
  7. Update the rule, and enable it.
  8. TEST THE RULE:  Go into the Components section for one or two of your Jira Projects and "Switch to Compass Components". Then use "Run rule" to execute this new rule manually.
  9. Check the Audit Log for this rule. The number of Jira projects should not be zero. And the Project keys for your test projects should be listed. Confirm that your test Projects now have Compass Components switched off.

IMPORTANT: The AUTHSTRING above is what most people struggle with. It is formed from your Jira email and your Jira PAT (Personal Access Token) with a colon ':' character in between them, with that whole string encoded using BASE64. This is documented here and here. Note that the "Basic" prefix is case-sensitive.

If the number of projects shows as zero, or if any "Send web request" components fail, focus on getting the Authorization value to be correct. The PAT should be for a Jira Admin, of course. Sorry that it's so complicated.

Nerd note: The 2nd "Send web request" returns a 404 if the project property was never set, which seems to be the default for most projects. The rule tolerates this response. All other response codes should be 200 if authentication is correct.

Audit Log

Here's an example showing what the rule logs:

auditLog.png

How You Can Help

Please take a moment and vote for suggestion JRACLOUD-92796. With enough votes maybe this will get fixed.

Feel free to also add comments to this article about the impact of this problem for you.

Here is the Rule JSON

{
"cloud": true,
"rules": [
{
"id": 30002632,
"clientKey": "be9a4feb-aaaa-bbbb-cccc-bb35916569fb",
"name": "Clear Compass Components",
"state": "ENABLED",
"description": "Change log:",
"authorAccountId": "712020:dac81762-aaaa-bbbb-cccc-6bc2cd2ce073",
"actor": {
"type": "ACCOUNT_ID",
"value": "557058:f58131cb-aaaa-bbbb-cccc-6b58d40bd077"
},
"created": 1756067205900,
"updated": 1758741548889,
"trigger": {
"id": "721694346",
"component": "TRIGGER",
"parentId": null,
"conditionParentId": null,
"schemaVersion": 1,
"type": "jira.jql.scheduled",
"value": {
"schedule": {
"cronExpression": "0 30 11,17 ? * MON-FRI",
"method": "CRON",
"rate": 0,
"rateInterval": 86400,
"rRule": "BEGIN:VEVENT\nDTSTART;TZID=America/Chicago:20250824T152522\nRRULE:FREQ=WEEKLY;BYHOUR=9;BYMINUTE=0;BYSECOND=0;BYDAY=SU;INTERVAL=1\nEND:VEVENT\n"
},
"jql": "",
"executionMode": "nosearch",
"onlyUpdatedIssues": true
},
"children": [],
"conditions": [],
"connectionId": null
},
"components": [
{
"id": "721766468",
"component": "ACTION",
"parentId": null,
"conditionParentId": null,
"schemaVersion": 1,
"type": "jira.issue.outgoing.webhook",
"value": {
"url": "{{baseUrl}}/rest/api/3/project",
"headers": [
{
"id": "_header_1756067707425",
"name": "Content-Type",
"value": "application/json",
"headerSecure": false
},
{
"id": "_header_1756067828628",
"name": "Accept",
"value": "application/json",
"headerSecure": false
},
{
"id": "_header_1756130702618",
"name": "Authorization",
"value": "**************************",
"headerSecure": true
}
],
"sendIssue": false,
"contentType": "empty",
"customBody": "false",
"method": "GET",
"responseEnabled": true,
"continueOnErrorEnabled": false
},
"children": [],
"conditions": [],
"connectionId": null
},
{
"id": "724528914",
"component": "ACTION",
"parentId": null,
"conditionParentId": null,
"schemaVersion": 1,
"type": "codebarrel.action.log",
"value": "Checking {{webResponse.body.key.size}} project(s). Any listed below were reset.",
"children": [],
"conditions": [],
"connectionId": null
},
{
"id": "721766469",
"component": "BRANCH",
"parentId": null,
"conditionParentId": null,
"schemaVersion": 1,
"type": "jira.smart.values.branch",
"value": {
"id": "_customsmartvalue_id_1756130753477",
"name": {
"type": "FREE",
"value": "ProjKey"
},
"type": "SMART",
"query": {
"type": "SMART",
"value": "{{webResponse.body.key}}"
},
"lazy": false
},
"children": [
{
"id": "721694570",
"component": "ACTION",
"parentId": "721766469",
"conditionParentId": null,
"schemaVersion": 1,
"type": "jira.issue.outgoing.webhook",
"value": {
"url": "{{baseUrl}}/rest/api/3/project/{{ProjKey}}/properties/jira.global.components",
"headers": [
{
"id": "_header_1756067707425",
"name": "Content-Type",
"value": "application/json",
"headerSecure": false
},
{
"id": "_header_1756067828628",
"name": "Accept",
"value": "application/json",
"headerSecure": false
},
{
"id": "_header_1756068296668",
"name": "Authorization",
"value": "**************************",
"headerSecure": true
}
],
"sendIssue": false,
"contentType": "empty",
"customBody": "false",
"method": "GET",
"responseEnabled": true,
"continueOnErrorEnabled": true
},
"children": [],
"conditions": [],
"connectionId": null
},
{
"id": "721766958",
"component": "CONDITION",
"parentId": "721766469",
"conditionParentId": null,
"schemaVersion": 1,
"type": "jira.comparator.condition",
"value": {
"first": "{{webResponse.body.value}}",
"second": "true",
"operator": "EQUALS"
},
"children": [],
"conditions": [],
"connectionId": null
},
{
"id": "721774486",
"component": "ACTION",
"parentId": "721766469",
"conditionParentId": null,
"schemaVersion": 1,
"type": "jira.issue.outgoing.webhook",
"value": {
"url": "{{baseUrl}}/rest/api/3/project/{{ProjKey}}",
"headers": [
{
"id": "_header_1756067707425",
"name": "Content-Type",
"value": "application/json",
"headerSecure": false
},
{
"id": "_header_1756067828628",
"name": "Accept",
"value": "application/json",
"headerSecure": false
},
{
"id": "_header_1756135891492",
"name": "Authorization",
"value": "**************************",
"headerSecure": true
}
],
"sendIssue": false,
"contentType": "empty",
"customBody": "false",
"method": "GET",
"responseEnabled": true,
"continueOnErrorEnabled": true
},
"children": [],
"conditions": [],
"connectionId": null
},
{
"id": "721774487",
"component": "CONDITION",
"parentId": "721766469",
"conditionParentId": null,
"schemaVersion": 1,
"type": "jira.comparator.condition",
"value": {
"first": "{{webResponse.body.style}}",
"second": "classic",
"operator": "EQUALS"
},
"children": [],
"conditions": [],
"connectionId": null
},
{
"id": "721774488",
"component": "CONDITION",
"parentId": "721766469",
"conditionParentId": null,
"schemaVersion": 1,
"type": "jira.comparator.condition",
"value": {
"first": "{{webResponse.body.archived}}",
"second": "true",
"operator": "NOT_EQUALS"
},
"children": [],
"conditions": [],
"connectionId": null
},
{
"id": "721766959",
"component": "ACTION",
"parentId": "721766469",
"conditionParentId": null,
"schemaVersion": 1,
"type": "codebarrel.action.log",
"value": "{{ProjKey}}",
"children": [],
"conditions": [],
"connectionId": null
},
{
"id": "721695518",
"component": "ACTION",
"parentId": "721766469",
"conditionParentId": null,
"schemaVersion": 1,
"type": "jira.issue.outgoing.webhook",
"value": {
"url": "{{baseUrl}}/rest/api/3/project/{{ProjKey}}/properties/jira.global.components",
"headers": [
{
"id": "_header_1756067707425",
"name": "Content-Type",
"value": "application/json",
"headerSecure": false
},
{
"id": "_header_1756067828628",
"name": "Accept",
"value": "application/json",
"headerSecure": false
},
{
"id": "_header_1756069163892",
"name": "Authorization",
"value": "**************************",
"headerSecure": true
}
],
"sendIssue": false,
"contentType": "custom",
"customBody": "false",
"method": "PUT",
"responseEnabled": true,
"continueOnErrorEnabled": true
},
"children": [],
"conditions": [],
"connectionId": null
}
],
"conditions": [],
"connectionId": null
},
{
"id": "721775223",
"component": "ACTION",
"parentId": null,
"conditionParentId": null,
"schemaVersion": 1,
"type": "codebarrel.action.log",
"value": "Reached end of rule.",
"children": [],
"conditions": [],
"connectionId": null
}
],
"canOtherRuleTrigger": false,
"notifyOnError": "FIRSTERROR",
"projects": [],
"labels": [],
"tags": [
{
"id": 118001239,
"tagType": "IS_RULE_UPDATED",
"tagValue": "true"
}
],
"ruleScope": {
"resources": [
"ari:cloud:jira::site/7f4b1767-aaaa-bbbb-cccc-dc82e641b707"
]
},
"ruleHome": {
"ruleLifecycleHome": {
"locationARI": "ari:cloud:jira-software::site/7f4b1767-aaaa-bbbb-cccc-dc82e641b707"
},
"ruleBillingHome": {
"locationARI": "ari:cloud:jira-software::site/7f4b1767-aaaa-bbbb-cccc-dc82e641b707"
}
},
"writeAccessType": "UNRESTRICTED",
"collaborators": [],
"billingType": "NORMAL",
"currentVersionId": null
}
]
}

 

5 comments

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 24, 2025

Hi @Mykenna Cepek 

Well done on this very useful rule to help admins mitigate the components-switching behavior!

Kind regards,
Bill

Like Mykenna Cepek likes this
Ganesh Choubey
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!
September 25, 2025

Hey Mykenna Cepek,

Thanks for the automation it actually worked, one more addition on it the baseUrl variable is not defined which was throwing some error if someone is using it pl make sure to use the Base URL Variable and add the value as actual site "https://XXX.atlassian.net/".

 

 

Regards,

Ganesh

Ben Robbins
Contributor
September 25, 2025

Ah the good old Atlassian way, "here's a new paid feature which system administrators cannot disable".

Are they hoping that we just get fed up of dealing with broken projects and pay up for the feature?

Like Anne Saunders likes this
Michiel SCHUIJER
Contributor
September 25, 2025

Nice, very well done. Thanks for sharing!

Mykenna Cepek
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 25, 2025

Thanks all for the feedback, I'm glad the rule is working for you!

@gan gan - The {{baseUrl}} is a standard Smart Variable in Jira Cloud. No idea why it would work fine for everyone else but not for your site. Might be worth an Atlassian Support ticket? It's been a feature for years, and is documented here:

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/#--baseUrl--

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events