Synchronize won't fix, resolved between long-lived branches

Must-share information (formatted with Markdown):

  • Version 7.7
  • synchronize won’t fix, resolved between long-lived branches

Hi,

We are experiencing issues because we use multiple long lived branches for our SonarQube projects.

  • Is there a way to synchronize won’t fix, resolved between long lived branches?
  • Are we using SonarQube branching in the proper way?
  • What do you suggest to solve our problem?

We are using Git Flow for our Gitlab projects. We have two long term branches per project: a master and develop branch. Features are developed in feature branches, which are branch offs from the develop branch. When we release the application we push develop to the master branch. https://nvie.com/posts/a-successful-git-branching-model/

In SonarQube we have two long lived branches “master”, “develop” per Gitlab project. There is no synchronisation of won’t fix, resolved issues between the long-lived branches (develop -> master). This leads to different reports for master and develop. Feature branches are short lived branches of the develop branch.

Hi,

Sorry, there’s not.

I guess you’re thinking that surely we’ve planned for this situation, so you must be overlooking something. If so, then thanks for your confidence. Unfortunately, we didn’t plan for this.

Since FP/WF issues are synchronized on PR merge, then adding one in (from Develop to Master, I guess) might help. I guess you’d need to re-FP the issues in question in that PR so there is probably exactly the duplicate work you’re looking to avoid. Unfortunately, that’s the best I’ve got. Maybe someone else in the community will have ideas.

 
HTH,
Ann

Hi,

don’t know if it helps, but there’s a plugin you might be interested in

seems not to be active anymore, and regarding the issues i believe it’s not working
for Sonarqube 7.7

Gilbert

Hello,

Is there still no way to transfer the resolved issues from one project to another, where 99% of the code is similar? We have the community edition so branch analysis is out of the way and the plugin already mentioned doesn’t work for our version of SonarQube (7.9).

Does anyone else could have an idea of how to handle this? Transfering resolved issues automatically would be a huge gain of time (we have 2K of those).

Hi,
Transferring issue resolution between projects is not supported. We have no plans to support that.

Does anyone else could have an idea of how to handle this? Transfering resolved issues automatically would be a huge gain of time (we have 2K of those).

You could create a script that uses web services to synchronize issue state between both projects. Another option would be to upgrade the plugin above to a newer version of the plugin API.

1 Like

Hello,
in your answer you reply that there is no resolution between projects. I wanted to get clarified if there is (still) no resolution between long living branches supported.
We have long living “master” branches for four different build targets (master_stm32, master_linux64, …). The need to mark the same findings four times as e.g. “Won’t fix” is a little cumbersome.
Cheers, Hubert

Hi Hubert,
That’s correct - once branches are created, they have an independent issue lifecycle and it’s not possible to connect issues between different branches.
When a branch is first created it inherits the issues from the main branch.

1 Like