Jira Integration Troubleshooting

Jira Integration - “Status Code 400 - Invalid Spaces in Labels”

Jira Integration - “Status Code 400 - Specify a Valid Value for Severity”

Jira Integration - “Field “(Field name or custom ID)” cannot be set. It is on the appropriate screen, or is unknown."

"I have a field in Jira bug reports which is a dropdown options type. When I map this field in my external destination JSON with the string name of one of the options in that dropdown, and then try to export a ticket from Centercode into Jira, that field is not matched, and the export errors out."

"errorMessages": [         "No operation with name 'set' found. Valid operations are: ADD,SET,REMOVE,EDIT,COPY"

Jira Integration - Jira Project is not on dropdown list

Jira Integration - Centercode sending blank fields

Jira Integration - “Status Code 400 - Invalid Spaces in Labels”

What to check for:

Review the JSON data for additional spaces between the label text and characters. 

Why:

This error message indicates that the JSON (label) contains spaces, which is not allowed in Jira. In Jira, labels can only contain letters, numbers, and hyphens. Any additional spaces will cause this 400 error. 

Suggested Solution: 

To fix this, you'll need to remove the spaces from the JSON (label) and resubmit the feedback ticket to Jira.

Jira Integration - “Status Code 400 - Specify a Valid Value for Severity”

What to check for:

Review the Jira Integration External Destination to confirm if the Severity value is selected.

Why:

If the severity value isn’t selected, this error message will indicate that the value for the custom field (Example: "customfield_", which is the "Severity" field in this Jira instance) is not valid.

Suggested Solution: 

To resolve this error, make sure that the value you are trying to set for the "Severity" field is entered within the Jira Integration External Destination and a valid option in Jira.

Jira Integration - “Field “(Field name or custom ID)” cannot be set. It is on the appropriate screen, or is unknown.”

What to check for:

This error message indicates something is misconfigured on the customer’s Jira.

Why:

This error indicates that the service account used for your Jira integration doesn’t have sufficient access to modify or submit certain fields on your Jira form or to create tickets within your Jira Project.

Suggested Solution: 

Have the customer verify with their Jira admin that the service account being used by Centercode (the one in the relevant external destination) has appropriate access to create tickets and modify the field referenced in the error message. The Jira integration error "field cannot be set, it is not on the appropriate screen or unknown" indicates that there was an issue with setting the field values within their Jira. To resolve this issue, the customer should verify that the fields they are trying to set are available within Jira. They may also need to check if the field is blank, has been renamed or deleted and if so, update the integration accordingly. If the issue persists, they may need to contact their Jira administrator for further assistance.

"I have a field in Jira bug reports which is a dropdown options type. When I map this field in my external destination JSON with the string name of one of the options in that dropdown, and then try to export a ticket from Centercode into Jira, that field is not matched, and the export errors out."

What to check for:

Confirm if the string name vs. ID is used in the JSON of the external destination.

Why:

When mapping the dropdown field to your external destination JSON, you should be using the correct ID associated with the dropdown option, not the string name in this case (map the value to the Jira custom field using the mapped ID).

Suggested Solution: 

To find the correct ID for a dropdown field option in Jira, you typically need to query the Jira REST API or inspect the HTML source code of the Jira issue view page.

Using Jira REST API:

  1. Get the Field Configuration ID:

    • Find the Field Configuration ID associated with your Jira project. You can usually find this in the Jira administration settings.

  2. Get the Field Configuration Scheme ID:

    • Find the Field Configuration Scheme ID associated with your Jira project.

  3. Get the Custom Field ID:

    • Find the Custom Field ID associated with your dropdown field. You can get this from the Jira administration settings or by inspecting the REST API responses.

  4. Query the REST API:

    • Use the Jira REST API to get the configuration for the custom field. The endpoint would look like:

      bashCopy codeGET /rest/api/2/field/{fieldId}/configurations
    • This will return a list of field configurations. Find the one that matches your Field Configuration ID and Field Configuration Scheme ID.

  5. Get Options for the Dropdown Field:

    • Once you have the correct Field Configuration, use the REST API to get the options for the dropdown field. The endpoint would look like:

      bashCopy codeGET /rest/api/2/field/{fieldId}/option/configuration/{fieldConfigId}
    • This will return a list of options with their IDs.

  6. Identify the Correct ID:

    • Find the ID associated with the option you want. This is the ID you should use when mapping values in Centercode.

Using HTML Source Code:

  1. Open an Issue with the Dropdown Field:

    • Go to a Jira issue that has the dropdown field set to the option you are interested in.

  2. Right-Click and Inspect Element:

    • Right-click on the dropdown field and select "Inspect" or "Inspect Element" in your web browser. This opens the browser's developer tools.

  3. Find the Option Value in HTML:

    • In the HTML source code, look for the <option> tag corresponding to the selected value. The value attribute of this tag contains the ID.

  4. Identify the ID:

    • Identify the ID from the value attribute. This is the ID you should use when mapping values in Centercode.

Remember that these steps may vary slightly based on the version of Jira you are using. Always refer to the documentation or support resources for your specific Jira version for the most accurate information.

  "errorMessages": [
        "No operation with name 'set' found. Valid operations are: ADD,SET,REMOVE,EDIT,COPY"

What to check for: 

The customer will need to check their configuration fields in Centercode and Jira to make sure they match. --> (https://jira.atlassian.com/browse/JRACLOUD-83663) 

Why: 

If the fields in Centercode's external destination configuration don't match the Jira account fields then this will result in an error when trying to push feedback to Jira (Ex: Typos, capitalization conflict, etc)

Suggested Solution: 

Have the customer correct the fields on their end in Centercode/Jira.

Jira Integration - Jira Project is not on dropdown list

What to check for:

The account used for the integration lacks high enough permissions to projects and/or create tickets with access to all fields. You must use a different account or have your Jira administrator upgrade the account’s permissions.

Why:

Jira only sends Centercode back a list of the projects that the service account being used has access to, not ALL projects.

Suggested Solution: 

Have the customer verify with their Jira admin that the service account being used by Centercode (the one in the relevant external destination) has appropriate access.

 

Jira Integration - Centercode sending blank fields

What to check for:

Verify if the customer copy/pasted JSON data from another project. This typically occurs if your Jira integration's JSON body contains Dynamic Tags that did not originate within your Project, meaning they were copied over from another Project's Jira integration. You must replace those Dynamic Tags with new ones to properly reference your Project. 

Why:

Dynamic tags are unique to each project, and copy/pasted tags from another project will not pull any data. 

Suggested Solution: 

Replace broken tags with new tags inserted via the dynamic tag tool on the Jira integration page.