# AzureDevOps Status policy on 2 builds

**URL:** <https://community.sonarsource.com/t/azuredevops-status-policy-on-2-builds/13490>\
**Category:** SonarQube Cloud\
**Tags:** azuredevops-server\
**Created:** [August 23, 2019, 8:09am UTC](https://community.sonarsource.com/t/azuredevops-status-policy-on-2-builds/13490 "2019-08-23T08:09:02Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![luigisaggese](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/luigisaggese/32/6475_2.png) [@luigisaggese](https://community.sonarsource.com/u/luigisaggese)\
**Post date:** [August 23, 2019, 8:09am UTC](https://community.sonarsource.com/t/azuredevops-status-policy-on-2-builds/13490/1 "2019-08-23T08:09:02Z")

</div>

Hello,  
I’m using SonarQube version `7.7.0.23042` Developer Edition connected to AzureDevops 2019 Update 1 RC.  
Actually, in each PR I have well-configured integration between build, status policy and quality gate.

I have an issue on another project when I configure to execute 2 builds policies at PR level, then I want to have 2 status policies reported but I see only one into the dropdown list. During the execution of the build the last that publish the result on SonarQube it’s the one the will report the Quality status check (then if one fails first will be not visible at PR level).

 ![03%20AM](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/2X/0/01c4f6d43d9eaa2b040817a93a462104cb9d4bad.png)

---

<div class="post-metadata">

**Author:** ![luigisaggese](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/luigisaggese/32/6475_2.png) [@luigisaggese](https://community.sonarsource.com/u/luigisaggese)\
**Post date:** [September 18, 2019, 11:42am UTC](https://community.sonarsource.com/t/azuredevops-status-policy-on-2-builds/13490/2 "2019-09-18T11:42:15Z")

</div>

I am in touch with Microsoft support and they replied that there is an issue on PR decorator on SonarQube.

I did further research and lab setup on this ask using sonar cloud also. Pull Request decoration is the one which is responsible to push the status to Azure DevOps. This setting is done at the Sonar side and there is no option at the Azure DevOps side to control the name Status policy name.

[https://sonarcloud.io/about/sq/branch-analysis-and-pr-decoration](https://sonarcloud.io/about/sq/branch-analysis-and-pr-decoration)

> **[Use pull request decoration in Azure DevOps with SonarCloud](https://writeabout.net/2019/04/18/use-pull-request-decoration-in-azure-devops-with-sonarcloud/)**
>
> How to use SonarCloud pull request analysis, pull request decoration and quality gates in Azure DevOps.

**Also, I don’t see an option at the sonar side to change it for each build analyzed as PR decoration is at sonar organization setting level.**

In this link [https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarqube](https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarqube) it is mentioned:

The **Publish Quality Gate Result** task waits for the analysis report to be consumed by the SonarQube in order to flag the build job with the Quality Gate status.

Could you please reconfirm that can be changed?

---

<div class="post-metadata">

**Author:** ![mickaelcaro](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/mickaelcaro/32/4147_2.png) [@mickaelcaro](https://community.sonarsource.com/u/mickaelcaro)\
**Post date:** [September 18, 2019, 1:23pm UTC](https://community.sonarsource.com/t/azuredevops-status-policy-on-2-builds/13490/3 "2019-09-18T13:23:55Z")

</div>

Hi,

For the moment, only one status per Pull Request can be posted. This is mainly due to the fact that multiple analyses for a single SC / SQ project is not yet supported (this is in our roadmap, but no ETA yet). So then the last analysis done wins over the previous one and overwrites it.

The Publish Quality Gate Result task is intended to post a report of the Quality Gate in the **build summary** only, it has nothing related to Pull Request decoration nor any Quality Gate status that is displayed in the right pane of them.

Mickaël

---

<div class="post-metadata">

**Author:** ![luigisaggese](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/luigisaggese/32/6475_2.png) [@luigisaggese](https://community.sonarsource.com/u/luigisaggese)\
**Post date:** [September 18, 2019, 2:02pm UTC](https://community.sonarsource.com/t/azuredevops-status-policy-on-2-builds/13490/4 "2019-09-18T14:02:48Z")

</div>

> [@mickaelcaro](#):
>
> The Publish Quality Gate Result task is intended to post a report of the Quality Gate in the **build summary** only, it has nothing related to Pull Request decoration nor any Quality Gate status that is displayed in the right pane of them.

Yes it’s reported in the build summary, but the only stuff it will be to change the name posted to the Status Policy (instead SonarQube/quality gate).

---

<div class="post-metadata">

**Author:** ![mickaelcaro](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/mickaelcaro/32/4147_2.png) [@mickaelcaro](https://community.sonarsource.com/u/mickaelcaro)\
**Post date:** [September 18, 2019, 2:04pm UTC](https://community.sonarsource.com/t/azuredevops-status-policy-on-2-builds/13490/5 "2019-09-18T14:04:52Z")

</div>

This name is deduced in our engine, so it canno’t be changed by users.

If you want to change the display name, then you can do it at the bottom of the pane you shown just above.

![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/2X/4/4bb5b454c482f8f1b054f113157f4f56042371fb.png)

---

<div class="post-metadata">

**Author:** ![luigisaggese](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/luigisaggese/32/6475_2.png) [@luigisaggese](https://community.sonarsource.com/u/luigisaggese)\
**Post date:** [September 18, 2019, 2:11pm UTC](https://community.sonarsource.com/t/azuredevops-status-policy-on-2-builds/13490/6 "2019-09-18T14:11:02Z")

</div>

Thanks!  
Can you send me the link of the User Story related to it?

“Multiple analyses for a single SC / SQ project is not yet supported”

Regards

---

<div class="post-metadata">

**Author:** ![mickaelcaro](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/mickaelcaro/32/4147_2.png) [@mickaelcaro](https://community.sonarsource.com/u/mickaelcaro)\
**Post date:** [September 18, 2019, 2:31pm UTC](https://community.sonarsource.com/t/azuredevops-status-policy-on-2-builds/13490/7 "2019-09-18T14:31:01Z")

</div>

Yes, there you are : [https://jira.sonarsource.com/browse/SONAR-11870](https://jira.sonarsource.com/browse/SONAR-11870)

---

<div class="post-metadata">

**Author:** ![luigisaggese](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/luigisaggese/32/6475_2.png) [@luigisaggese](https://community.sonarsource.com/u/luigisaggese)\
**Post date:** [January 28, 2020, 6:33am UTC](https://community.sonarsource.com/t/azuredevops-status-policy-on-2-builds/13490/8 "2020-01-28T06:33:53Z")

</div>

Hello @mickaelcaro! There are some news on this issue?
