CircleCI Error: unknown association

Steve Gore December 7, 2020

We are trying to integrate CircleCI with Jira Deployments. We run the following command in our .circleci/config.yml file:

 - jira/notify: 
    environment: << parameters.environment >>
    job_type: deployment
    token_name: CIRCLE_TOKEN_FOR_JIRA

 

And get the error:

200:https://********.com/api/v2/me?circle-token=****************************************
"xxx"
200:https://********.com/api/v1.1/project/bitbucket/xxx/xxx/415
200:https://********.com/api/v2/workflow/xxx
This job is passing, however another job in workflow is running
Update Jira with status: successful for 174
Results from Jira: 
ERROR: unknown association
{
  "acceptedDeployments": [
    {
      "pipelineId": "xxx",
      "environmentId": "xxx-dev",
      "deploymentSequenceNumber": 174
    }
  ],
  "rejectedDeployments": [],
  "unknownIssueKeys": [],
  "unknownAssociations": [
    {
      "associationType": "serviceIdOrKeys",
      "values": [
        ""
      ]
    }
  ]
}

 

2 answers

1 vote
Stephen Lee February 3, 2021

I'm having the same issue...

Andrew Grossman April 10, 2021

As am I...

MJ Kim
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 3, 2021

Please try to provide a valid `issue key` or `service id` to `associations` (In most cases, you would want to use issue key), which will be the only bridge between circleCI and Jira.  You provided empty string as association.

 

This association is used to associate deployment information with issues. If you send deployment with invalid association to Jira, Jira wouldn't know where to use this information. That's why with invalid association value, Jira can't know what to do with it.

 

Thank you.

 

MJ Kim

DevOps team, Atlassian

Colin McCririck August 31, 2021

I'm getting the same error.  Reading the orb details it should error:

echo "No Jira issue keys found in commit subjects or branch name, skipping."

but it doesn't. 

It successfully calls Jira with an empty key. 

Is there some way to get the key from the GITHUB PR title/body?  I don't like the idea of having to force developers to tag commit or branch name as well as PR .

Like # people like this
0 votes
Kyle Tryon June 10, 2021

Hello folks, 

Could anyone experiencing this issue provide more information about their usage?

  •  Share an example Issue ID so that we may check its pattern
  • What is the branch name in the failing occurrences?
  • Does this work some of the time or is this a constant issue?

 

The Issue ID must be located in either the branch name or the commit message (subject). We are looking into feedback there may be an edge-case related to tagged commits that experience this issue.

 

We have just tested the integration and did not replicate the issue. This has us thinking the issue may be around a bad regex pattern for the issue IDs or possibly the issue IDs not being picked up for another reason we are hoping to discover.

Stephen Lee June 10, 2021
David Branton December 21, 2021

Can the requirement for the issue id being in the commit header be relaxed? As much as I'd like to use this functionality I don't want my commit history reading like a list of JIRAs. It isn't as useful as why the commit was made. JIRA issue ids are always just metadata on a commit...not why a commit was made which needs to read like a sentence (e.g. This commit will <start of actual commit message>)

Like # people like this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events