Portfolio Regex Not Working


(Jeff Mathers) #1

Hello All,

I’m trying to create a portfolio view, but the regex does not find any projects. The projects all start with the same word FUSION, but when I add the regex FUSION*, it does not return any projects. What am I missing?

thanks for the help

jeff


(G Ann Campbell) #2

Hi jeff,

You appear to be using bash regex, not “normal” regex. Have you tried FUSION.*?

Ann


(Jeff Mathers) #3

no - but I will try that now…and it had no effect. Here’s an exact name of a project:

FUSION - Test - emea.hob.com - Drupal7

I thought that just FUSION* should work, but it does not.


(Colin Mueller) #4

Jeff,

Are you refreshing your portfolios after changing the definition? In addition, what version of SonarQube are you running?

Colin


(Jeff Mathers) #5

I did hit the “recompute” button. We are using 7.1.0.11001 (enterprise version)


(G Ann Campbell) #6

Hi,

I just tested, and it worked for me. Specifically, I set a regex of Sonar.* and after recomputing got a portfolio that was populated as expected. Admittedly, I tested on a recent snapshot, but we haven’t worked on any regressions in this area, so it should be the same in 7.1.

Ann


(Jeff Mathers) #7

how did you recompute? Command line? From the button? I guess I answered my own question:

command line no longer works on 7.1:
ERROR: The task ‘views’ was removed with SonarQube 7.1. You can safely remove this call since portfolios and applications are automatically re-calculated.


(G Ann Campbell) #8

Yes, with the button, which queues recalculation of all Portfolios and Application when used at the global Administration level, and of an individual Application or Portfolio when used from the local, Administration > Edit Definition level.

Ann


(Jeff Mathers) #9

Strange - does not seem to work for me. I’ve been trying a few other expressions and I can’t get any portfolio to populate. They do populate if I manually select projects. I see the recalculation in the logs and I see the portfolio listed as recalculating, but it is still empty.


(G Ann Campbell) #11

Hi,

Let’s take it back to basics. If you set up a regex that exactly matches a project name (e.g. FUSION - Test - emea.hob.com - Drupal7), is the project added to the portfolio after recalculation?

Ann


(Jeff Mathers) #12

Yes - that does work. Hmm…maybe white space is causing the problem. I will play around more with this. Good tip! I created a project called “project” and that does work.


(Colin Mueller) #13

Jeff,

One last tip: If you ever need to specify a literal character that would otherwise be deemed “special” (like the ., representing any character), surround it with brackets.

FUSION - Test - emea[.]hob[.]com - Drupal7

Colin


(Jeff Mathers) #14

Thanks everybody. I’m not sure what was not working before. Now FUSION.* does work. Very strange, but thanks for all the quick responses.