Jira Integration

Template for a good new topic, formatted with Markdown:

  • ALM used (GitHub, Bitbucket Cloud, Azure DevOps)
  • CI system used (Bitbucket Cloud, Azure DevOps, Travis CI, Circle CI
  • Scanner command used when applicable (private details masked)
  • Languages of the repository
  • Only if the SonarCloud project is public, the URL
    • And if you need help with pull request decoration, then the URL to the PR too
  • Error observed (wrap logs/code around with triple quotes ``` for proper formatting)
  • Steps to reproduce
  • Potential workaround

Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!

Hey Team- I’ve gone through previous comments but alas I’m back at the top of the circle. My team would like to have Jira & Sonarcube integrated, as right now we have tickets in Sonarcube that are not being created in Jira- and we use Jira to manage the global team as we do not want everyone to have access to Sonarcube. Is there a way to have them talk to eachother in a two way fashion? I asked Claude.ai and it suggested I use GIt Integration for Jira (Devinti). Any suggestions are welcome.

Welcome to the community. SonarQube Cloud’s Jira Cloud integration is a one-way sync for pushing issues from SonarQube Cloud to Jira Cloud. The usual workflow is as follows.

  1. Developer sees an issue on their feature branch in SonarQube.
  2. Developer pushes the issue from SonarQube to Jira.
  3. Developer makes a PR that resolves the issue.
  4. Feature branch is re-scanned and the issue is automatically resolved in SonarQube.
  5. Developer closes the Jira issue.

Can you provide more information about your use-case for needing a two-way sync? For example: how does your workflow differ from the workflow above?

Hey Austin- Thanks for the reply. The desire to have a two-way is we manage our global team with Jira, and keep those who have access to Sonarcube to a minimum. In order for me as a scrum master to be able to track story points, assignee’s, work capacity, velocity, etc. it would be ideal if when tickets are closed in Jira, they would talk to Sonarcube and close in there as well. What’s happening now is someone has to spend several hours closing tickets in Sonarcube, which is tedious, costly, and doesn’t make sense. Feel free to email me if that’s easier.

Is there a reason you need to close the issue before the next scan? On the next scan, if an issue has been fixed in code, SonarQube automatically closes the issue.

Hey Austin- the issue is that there are sonar cube issues that are not in Jira, and there are tickets in Jira that have been started by a developer that are not “talking back” to Sonar to say they’ve been assigned. Thus the need for a 2way communication…as I issue the tickets from Jira, not from Sonar, b/c that’s where we have our project management located.

the issue is that there are sonar cube issues that are not in Jira

Do you have the Jira Cloud integration configured? If so, you can push individual issues from SonarQube to Jira; and, you can also bulk push up to 500 issues.

Or, maybe you’re wanting issues in SonarQube to automatically create issues in Jira, without the need to manually push?

Are you using automatic issue assignment? If you are, then the developer that introduced the commit that raised the issue is automatically assigned to the issue in SonarQube.

Automatic issue assignment

SonarQube automatically assigns an issue during analysis to the last committer on the issue line - called issue author - if the author can be correlated to a SonarQube user.

Login and email correlations between SCM account and SonarQube user are made automatically. For example, if the user commits with their email address and that email address is part of their SonarQube user profile, then new issues raised on lines where the user was the last committer will be automatically assigned to the user.

  • Currently, issues on any level above a file, for example, issues reported at a directory or project level, cannot be automatically assigned.
  • If the SCM login associated with an issue is longer than 255 characters including the characters for an issue author, the author will be left blank.

Hey! Is it possible to hop on a virtual call?

Yes we have the Automatic Issue Assignment- but it does not speak from Jira to Sonarcube. That is the issue. I need actions performed in Atlassian/Jira to then bounce to Sonarcube. Not from Sonar to Jira.

Hi @ebaadsvik ,

At the communication is only one way. From Sonar to Jira. I will let my colleagues know about this feature request.

Yes- Thank you. This is a huge gap and missed opportunity and makes it difficult to work with both.