Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-71468

Updated invalid page, in wrong space

XMLWordPrintable

      The plugin updated the page in the wrong space. This is probably caused by REST API of Confluence.

       $ curl -s "$API/?title=Expiration+status&space=SPACE&expand=body.storage" --header "Authorization: Bearer $AUTH" | jq '.results[]._links.webui'
      "/display/WRONG_SPACE/Expiration+status"
      "/display/SPACE/Expiration+status"
      $ curl -s "$API/?title=Expiration+status&space=SPACE&expand=body.storage" --header "Authorization: Bearer $AUTH" | jq '.results[].id'
      "830309697"
      "811764284"
      

      Probably, there is needed another test to check returned page IDs.

      $ curl -s "$API/811764284" --header "Authorization: Bearer $AUTH" | jq '._links.webui'
      "/display/SPACE/Expiration+status" 
      $ curl -s "$API/830309697" --header "Authorization: Bearer $AUTH" | jq '._links.webui'
      "/display/WRONG_SPACE/Expiration+status"

            jhansche Joe Hansche
            dracorp dracorp
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: