Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-12510

Do not fail when importing existing application branch in XML definition

    XMLWordPrintable

    Details

    • Edition:
      Community
    • Production Notes:
      None

      Description

      It's not possible to import the same definition of an application with a branch using api/views/define.

      For instance, importing the following configuration :

      <?xml version="1.0" encoding="UTF-8"?>
      <views xmlns="http://sonarsource.com/schema/views">
          <vw key="testingapp" def="false">
              <name><![CDATA[TestingApp]]></name>
              <desc><![CDATA[TestingApp (SUPPORT-15998 tests)]]></desc>
              <qualifier><![CDATA[APP]]></qualifier>
              <branch key="mytestbranch">
                  <p branch="master"><![CDATA[mytestproject]]></p>
              </branch>
          </vw>
      </views>
      

      fail with :

      ERROR:  duplicate key value violates unique constraint "projects_kee"
      DETAIL:  Key (kee)=(testingapp:BRANCH:mytestbranch) already exists.
      STATEMENT:  INSERT INTO projects (
      [...]
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sebastien.lesaint Sebastien Lesaint
              Reporter:
              julien.lancelot Julien Lancelot
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: