Cannot add applications with two same projects under a portfolio

  • Using SonarQube Enterprise Edition Version 7.9.1
  • Our team want to create a Portfolio that has applications under it, and the two applications have duplicate copies of some projects. So, we are getting an error during the analysis, java.lang.IllegalStateException: Project ‘Project1’ [:] is used several times in portfolio ‘Portfolio1’.
    Portfolio: Portfolio1
    Application: App1
    project1
    project2
    project3
    Application: App2
    project1
    project4
    project5
    Here in the above example project1(shared library) being used by the Applications App1 and App2, Since both the teams uses this library want to have this in the aggregated reports. For the higher management, in the Portfolio we need both the applications for aggregated analysis. We tried to create a sub-portfolio instead of the local-reference, but that didn’t give us option to select to the already selected project.We understand, that project1 will be computed twice. But is there another way for some of our users to do so?

Thanks
Rama

Hi Rama,

First, this is working as designed. We don’t allow the same project to be present in a portfolio multiple times because then the numbers get weird as you roll them up.

You say both teams use the library. But which team is responsible for it?

 
Ann

Hi Ann,

Here the shared library is maintained by both the teams. As and when required the teams make changes to the library and responsible it.

Thanks
Rama

Hi Rama,

It’s not ideal, but for the purposes of reporting my suggestion is that you create two sets of parallel structures:

   TeamA         Team B
  /  |   \       /  |  \
1   lib  2      3  lib  4

   TeamA'        Team B'
   /   \         /   \
  1     2       3     4

The teams would use TeamA and TeamB for their everyday use. For reporting you would include TeamA' and TeamB' in the portfolio, plus the library individually.

The up-side is that once this is set up, there’s really no maintenance; all the numbers will be updated automatically.

 
HTH,
Ann