Unfortunately, thereâs no good way to do this. An Event is added to the analysis when the Quality Gate status, changes. And one is added when the Quality Profile in use changes. But one is not added when the Quality Gate in use changes.
Iâm going to move this topic to the Product Manager for a Day category since the functionality doesnât exist.
I think I know what the answer will be, but would you mind explaining why you want this?
Hi Ann,
We are developing a centralized tool to measure the quality of a set of products. Among other tools, we are planning to fetch information from sonarqube.
An important information is to know how products are in terms of their Quality Gate. For that is necessary to know what QG had the sonarqube project runed against to.
If a project is passed, then we want to know what was the quality gate used during the scan. (Not necessarily the actual one)
There is no log table with info about what QG was configured for each execution?
Thanks for taking the time to explain.
Can you please tell me more about it? Is this something you plan to monitor or rather a piece of information that you would like to save with, for example, every release? Would you need to identify the name of the Quality Gate that was used, or would you also need to identify what was the definition of the Quality Gate at that time?
Hi Christophe,
Idea is to built a monitorization tool, and keep traking of the scans. Issue is that QG can be updated at any time and that way itâs not assured that a scan few days earlier is the one configured today.
However maybe itâs important to keep is the measures (not the QG). Does API offers a endpoint where query about measures in the past for a given project ?
Maybe endpoint /api/measures/search_history?component offers the list of measurements for each project?
Is it possible to get the update of the QualityGate of a project from the api endpoint: /api/project_analyses/search?project=<âŠ> ?
The update of a QG for a project will create an Event that is fetched from endpoint?
That way weâll know if the QG was updated.
Trying to call the endpoint, the response gets following info within: âeventsâ: [
{*
"key": "AYoZv7LHoVQd_pm_PowR",*
"category": "QUALITY_GATE",*
The key isnât the QG key.
Is this key possible to be used somewhere to get more details about the events?
I realize that your question remains unanswered. Since you are now looking for assistance, I think you would get a better chance to get some help from the community if you split your question from your initial suggestion and post it outside of the âProduct Manager for a Dayâ category.
Thanks a lot for the suggestion.
Should i create a new post? or is it possible to update of âProduct Manager for a Dayâ configuration of the post? (i donât recall to had classify it like PM for a day)
Youâll be able to choose a category when you create your new thread. Without re-reading the thread, Iâm guessing the âSonarQubeâ category will be best.