Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,359,907
Community Members
 
Community Events
168
Community Groups

CircleCI Error: unknown association

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

I'm having the same issue...

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

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 Florent Gestin likes this

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.

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 Steve Gore likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
Community showcase
Published in Apps & Integrations

Apps for Confluence you won't want to miss: RSVP for September's Appy Hours

Calling all collaborators and Confluence users! Our Appy Hours event on September 29th features 4 presenters demoing functionality to superpower Confluence. Don't miss learning about these apps i...

113 views 0 9
Read article

Atlassian Community Events