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

Importing Capabilities allows additional programs to contain same program as the primary program breaking API PATCH requests

    XMLWordPrintable

Details

    • Severity 3 - Minor
    • No

    Description

      Issue Summary

      Users can import Capabilities via Excel with both Primary Program and Additional Programs containing the same program. This causes PATCH API validation check to return an error:

      Cannot update capability with id ###. Cannot add additional program that is the same as the primary program id ###.

      Issue happens even if PATCH API attempts to update unrelated properties such as PI or description.

      Steps to Reproduce

      1. Create an Excel Capabilities import file
        1. Fill both Primary Program and Additional Programs with the same Program
      2. Import the Capability
      3. Try PATCH API to edit the capability, /rest/align/api/2/capabilities/<id> endpoint
      4. Observe the error

      Expected Results

      UI does not allow adding the same program to Additional Programs, changes to the Capability in UI fix the issue, so it is expected that either

      • import would reject the file with a descriptive error
      • import would ignore the Primary Program value in the Additional Programs field

      Actual Results

      When doing a GET request on such a capability, we get:

          "primaryProgramId": 402,
          ...
          "additionalProgramIds": [
            402
          ], 

      PATCH requests fail.

      PUT request succeeds.

      Workaround

      Make sure Primary Program and Additional Programs do not contain the same program in the Import file. Use UI or PUT requests to modify the Capabilities initially after import.

      Attachments

        Issue Links

          Activity

            People

              dfuller@atlassian.com Don Fuller
              c7f2a2ebc58e Kirill Duplyakin
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Backbone Issue Sync