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

API - "NeededBySprintID" is not being set on POST Dependency API

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: High High
    • 10.132.3
    • 10.131.3
    • REST API
    • 3
    • Severity 2 - Major
    • No

      Issue Summary

       

      Pre-requirement: Details Settings Panel -> Dependency -> Needed By (Required)                                

       

      When consuming POST /rest/align/api/2/Dependencies, to add an Epic Dependency, and if they needed by is required, then the API response will trigger an error with the following message:

      Cannot create Dependency. Following properties: 'neededBySprintId' are required.

       

      However, if the user tries to add the "NeededBySprintId" in the payload, it will trigger another error:

      Cannot create Dependency. neededBySprintId cannot be set for Epic dependency. 

      Steps to Reproduce

      1. Consume the endpoint POST /rest/align/api/2/Dependencies/
      2. The payload can the like the following:
        1.  { 
           
           "title": "LUIZ DEPENDENCY API 2",
           "description": "It is a test for API and required fields",
           "releaseId": 759,
           "typeId": 6,
           "dependencyType": 2,
           "epicId": 7798,
           "requestingProgramId": 516,
           "dependsOnProgramId": 561
            }
          
        1. Note that the "typeId" must be set as 6, and "dependencyType" = 2
      1. Another payload that can be tested after the "neededBySprintId" triggers an error is the following:
        1.  { 
          
           "title": "LUIZ DEPENDENCY API 2",
           "description": "It is a test for API and required fields",
           "releaseId": 759,
           "typeId": 6,
           "dependencyType": 2,
           "epicId": 7798,
           "requestingProgramId": 516,
           "dependsOnProgramId": 561,
           "neededBySprintId":4104
            }
          
        1. In the "neededBySprintId" it was tested using AnchorSprintId, and SprintId. Both cases triggered the same issue.

      Expected Results

      The API responds successfully, creating the Dependency.

      Actual Results

      The API returns the following error:

      Cannot create Dependency. neededBySprintId cannot be set for Epic dependency.
      

      Workaround

      The workaround for it is to turn off the required "Needed By" toggle.

              fea1a6ef3355 Yannick Genin
              f9fc804f30c6 Luiz Felipe Arruda
              Votes:
              5 Vote for this issue
              Watchers:
              10 Start watching this issue

                Created:
                Updated:
                Resolved: