Uploaded image for project: 'Jira Align'
  1. Jira Align
  2. JIRAALIGN-6985

Adding Program to Theme with Archived PI works in UI but not in API

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 11.13.0
    • 10.131.3, 11.2.0
    • REST API, Themes

      Issue Summary

      The customer has reported a discrepancy in behavior between the UI and the API when attempting to add Programs to Themes that are part of a PI with archived status. In the UI, it's possible to add new Programs to the Theme, but via the API, an error message is received: "Cannot update theme with id XXX. Cannot add an archived release".

      Steps to Reproduce

      1. Prerequisites: A PI with archived status containing multiple programs.
      2. Open a Theme associated with this PI and attempt to add a new Program (associated with the PI).
      3. You'll be able to do so without any issues.
        # Now, remove the program and try via API using, for example:


      Expected Results

      The API to allow updates to the Theme if this is part of an archived PI, as the way it is behaving now, it will not allow the normal usage of Themes

      Actual Results

      The  API is not complaining about the Program being part of an Archived PI, it is complaining because the Theme is linked to an archived PI while it tries to do any update. If we have a Theme associated with a PI that was archived, any update you try to do to this Theme via PATCH will fail with the same message.

      Like in this example, If I try to change the Description of Theme 478, which has the PI 700 that has archived, it will throw the message:

      C02D6041MD6Q:/Users/admin/Desktop - 09:26:06
      admin: cat scripts/patch_content.txt 
      [
          {
              "op": "add",
              "path": "Description",
              "value": "Diego Test Theme 2024 - 2"
      }
      ]
      C02D6041MD6Q:/Users/admin/Desktop - 09:26:32
      admin: api -a Themes -m patch -i 478 -c scripts/patch_content.txt 
      Cannot update theme with id 478. Cannot add an archived release.
      

      If I remove the archived PI from the Theme and try to add a Program associated with this archived PI, it will work without problems:

      C02D6041MD6Q:/Users/admin/Desktop - 09:30:06
      admin: api -a Themes -m get -i 478 -f '$select=releaseIds,programIds'
        % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                       Dload  Upload   Total   Spent    Left  Speed
      100    45  100    45    0     0     57      0 --:--:-- --:--:-- --:--:--    57
          {
              "releaseIds": [
                  745,
                  746
              ],
              "programIds": [
                  196
              ]
          }
      C02D6041MD6Q:/Users/admin/Desktop
      admin: api -a Themes -m patch -i 478 -c scripts/patch_content.txt 
      
      C02D6041MD6Q:/Users/admin/Desktop
      admin: api -a Themes -m get -i 478 -f '$select=releaseIds,programIds'
        % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                       Dload  Upload   Total   Spent    Left  Speed
      100    49  100    49    0     0     82      0 --:--:-- --:--:-- --:--:--    82
          {
              "releaseIds": [
                  745,
                  746
              ],
              "programIds": [
                  196,
                  260
              ]
          }
      
      

      We would like the API to allow updates to the Theme if this is part of an archived PI, as the way it is behaving now, it will not allow the normal usage of Themes.

      Workaround

      Currently, there is no known workaround for this behavior. A workaround will be added here when available

        1. screenshot-1.png
          screenshot-1.png
          137 kB
        2. screenshot-2.png
          screenshot-2.png
          47 kB

              9cd547254f0d Vishnuvardhan Vaidhyanathan
              82697f38779c Vasti Marucci
              Votes:
              11 Vote for this issue
              Watchers:
              14 Start watching this issue

                Created:
                Updated:
                Resolved: