Jira Cloud: Importing an automation rule with a Send web request action that is exported from Jira automation of a Jira Software Data Center instance failed with an error about headers

Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.

Summary

On Jira Cloud, importing an automation rule with a Send web request action that is exported from Jira automation of a Jira Software Data Center instance failed with these errors.

Error parsing provided JSON. Please ensure it was created using 'Export rules' previously. 
If the problem persists please contact Atlassian support! Error: MismatchedInputException: 
Cannot deserialize value of type `java.lang.String` from Object value (token `JsonToken.START_OBJECT`) 
at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 159] (through reference chain: 
com.codebarrel.automation.rulecomponent.jira.action.outgoingwebhook.OutgoingWebhookActionConfig["headers"]-
>java.util.ArrayList[0]→com.codebarrel.automation.rulecomponent.jira.action.outgoingwebhook.OutgoingWebhookActionConfig$Header["value"])
Error parsing provided JSON. Please ensure it was created using 'Export rules' previously. If the problem persists please contact Atlassian support! 
Error: UnrecognizedPropertyException: Unrecognized field "usedSecretsKeys" (class com.codebarrel.automation.rulecomponent.jira.action.outgoingwebhook.OutgoingWebhookActionConfig), 
not marked as ignorable (8 known properties: "responseEnabled", "sendIssue", "contentType", "headers", "url", "method", "customBody", "continueOnErrorEnabled"]) 
at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 776] (through reference chain: 
com.codebarrel.automation.rulecomponent.jira.action.outgoingwebhook.OutgoingWebhookActionConfig["usedSecretsKeys"])



Environment

Jira Cloud

Diagnosis

The JSON file is an automation rule exported from a Jira Software Data Center instance

Cause

The JSON format of the Send web request action is slightly different between Jira Cloud and Jira Software Data Center. The differences that cause the errors mentioned in this article are:

  • The headers. The table below is shows the difference of the header for the Send web request action in the JSON file.

    Jira Software Data CenterJira Cloud
                        "type": "jira.issue.outgoing.webhook",
                        "value": {
                            "url": "https://webhook.atlassian",
                            "headers": [
                                {
                                    "id": "_header_1257914962009",
                                    "name": "",
                                    "value": {
                                        "keyOrValue": "",
                                        "secret": false
                                    }
                                }
                            ],
                        "type": "jira.issue.outgoing.webhook",
                        "value": {
                            "url": "https://webhook.atlassian",
                            "headers": [
                                {
                                    "id": "_header_1257914962009",
                                    "name": "",
                                    "value": "",
                                    "headerSecure": false
                                }
                            ],
  • The usedSecretsKeys option. 

    Jira Software Data CenterJira Cloud
                                "type": "jira.issue.outgoing.webhook",
                                "value": {
                                    "url": "https://webhook.atlassian",
                                    "headers": [
                                        {
                                            "id": "_header_1728583216375",
                                            "name": "",
                                            "value": "",
                                             "headerSecure": false
                                        }
                                    ],
                                    "sendIssue": false,
                                    "contentType": "empty",
                                    "method": "GET",
                                    "responseEnabled": true,
                                    "usedSecretsKeys": []
                                },
                                "type": "jira.issue.outgoing.webhook",
                                "value": {
                                    "url": "https://webhook.atlassian",
                                    "headers": [
                                        {
                                            "id": "_header_1728583216375",
                                            "name": "",
                                            "value": "",
                                             "headerSecure": false
                                        }
                                    ],
                                    "sendIssue": false,
                                    "contentType": "empty",
                                    "method": "GET",
                                    "responseEnabled": true,
                                },


Solution

Edit the JSON file accordingly before importing it to Cloud.

  • Replace the format of the header value with the following. If there should be an actual value, place them accordingly.

    "value":"","headerSecure":false}]
  • Remove the part below from the file.

    ,"usedSecretsKeys": []},


Last modified on Dec 4, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.