Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-18666

(REST) Add REST endpoints that will return plan dependencies (children and parents)

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • None
    • REST API
    • None
    • 0
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      Summary

      • Following endpoint in https://docs.atlassian.com/bamboo/REST/6.1.1 are not retrieving the expected result set:
        http://myhost.com:8085/bamboo/rest/api/latest/dependency/search/{projectKey}-{buildKey}/child [GET]
        http://myhost.com:8085/bamboo/rest/api/latest/dependency/search/{projectKey}-{buildKey}/parent [GET]
        
      • Both endpoint are implementing the same method.
      • Using misleading parameters: projectKey buildKey

      Environment

      Existent PROJECT - PLAN in Bamboo whilst running test:

      • DEP-CHIL (Dependency - Child)
      • DEP-PAR (Dependency - Parent)

        Plan configuration >> Dependencies >> Child plans poiting to DEP-CHIL

      • PROJ-PLANA (Project - Plan A)
      • PROJ-PLANB (Project - Plan B)
      • PROJ-PLANC (Project - Plan C)

      Steps to Reproduce

      • run any of the following cURL command:
        Search for available plan parent dependencies
        curl -u admin:admin
          -H 'accept: application/json' \
          -H 'content-type: application/json' \
          -X GET 'http://localhost:8085/rest/api/latest/dependency/search/DEP-PAR/parent?searchTerm='
        
        Search for available plan child dependencies
        curl -u admin:admin
          -H 'accept: application/json' \
          -H 'content-type: application/json' \
          -X GET 'http://localhost:8085/rest/api/latest/dependency/search/DEP-PAR/child?searchTerm='
        

      Expected Results

      In Search for available plan parent dependencies, no results should be found since there is not dependency of any plan.
      In Search for available plan child dependencies, only DEP-CHIL should be listed

      Actual Results

      • All plans as displayed under dependencies.plan section:
        {
            "expand": "dependencies",
            "link": {
                "href": "http://localhost:8085/rest/api/latest/dependency/search/DEP-PAR/parent",
                "rel": "self"
            },
            "dependencies": {
                "size": 3,
                "expand": "plan",
                "start-index": 0,
                "max-result": 3,
                "plan": [
                    {
                        "shortName": "Child",
                        "shortKey": "CHIL",
                        "type": "chain",
                        "enabled": false,
                        "link": {
                            "href": "http://localhost:8085/rest/api/latest/plan/DEP-CHIL",
                            "rel": "self"
                        },
                        "key": "DEP-CHIL",
                        "name": "Dependency - Child",
                        "planKey": {
                            "key": "DEP-CHIL"
                        }
                    },
                    {
                        "shortName": "Plan A",
                        "shortKey": "PLANA",
                        "type": "chain",
                        "enabled": false,
                        "link": {
                            "href": "http://localhost:8085/rest/api/latest/plan/PROJ-PLANA",
                            "rel": "self"
                        },
                        "key": "PROJ-PLANA",
                        "name": "Project - Plan A",
                        "planKey": {
                            "key": "PROJ-PLANA"
                        }
                    },
                    ...
        

      Notes

      • Both endpoint (parent?searchTerm= and child?searchTerm=) are retrieving the same result set.
      • searchTerm seems to search only project name/key, e.g:
        • searching for existent dependency by referring plan name/key (chil stands for plan key):
          curl -u admin:admin
            -H 'accept: application/json' \
            -H 'content-type: application/json' \
            -X GET 'http://localhost:8085/rest/api/latest/dependency/search/DEP-PAR/parent?searchTerm=chil'
          
          {
              "expand": "dependencies",
              "link": {
                  "href": "http://localhost:8085/rest/api/latest/dependency/search/DEP-PAR/parent",
                  "rel": "self"
              },
              "dependencies": {
                  "size": 0,
                  "expand": "plan",
                  "start-index": 0,
                  "max-result": 0,
                  "plan": []
              }
          }
          
        • searching for existent dependency by referring project name/key (dep stands for project name Dependency):
          curl -u admin:admin
            -H 'accept: application/json' \
            -H 'content-type: application/json' \
            -X GET 'http://localhost:8085/rest/api/latest/dependency/search/DEP-PAR/parent?searchTerm=dep'
          
          {
              "expand": "dependencies",
              "link": {
                  "href": "http://localhost:8085/rest/api/latest/dependency/search/DEP-PAR/parent",
                  "rel": "self"
              },
              "dependencies": {
                  "size": 1,
                  "expand": "plan",
                  "start-index": 0,
                  "max-result": 1,
                  "plan": [
                      {
                          "shortName": "Child",
                          "shortKey": "CHIL",
                          "type": "chain",
                          "enabled": false,
                          "link": {
                              "href": "http://localhost:8085/rest/api/latest/plan/DEP-CHIL",
                              "rel": "self"
                          },
                          "key": "DEP-CHIL",
                          "name": "Dependency - Child",
                          "planKey": {
                              "key": "DEP-CHIL"
                          }
                      }
                  ]
              }
          }
          
        • searching for existent dependency by referring project name/key (pr stands for project name Project):
          curl -u admin:admin
            -H 'accept: application/json' \
            -H 'content-type: application/json' \
            -X GET 'http://localhost:8085/rest/api/latest/dependency/search/DEP-PAR/parent?searchTerm=pr'
          
          {
              "expand": "dependencies",
              "link": {
                  "href": "http://localhost:8085/rest/api/latest/dependency/search/DEP-PAR/parent",
                  "rel": "self"
              },
              "dependencies": {
                  "size": 1,
                  "expand": "plan",
                  "start-index": 0,
                  "max-result": 1,
                  "plan": [
                      {
                          "shortName": "Plan A",
                          "shortKey": "PLANA",
                          "type": "chain",
                          "enabled": false,
                          "link": {
                              "href": "http://localhost:8085/rest/api/latest/plan/PROJ-PLANA",
                              "rel": "self"
                          },
                          "key": "PROJ-PLANA",
                          "name": "Project - Plan A",
                          "planKey": {
                              "key": "PROJ-PLANA"
                          }
                      },
                      {
                          "shortName": "Plan B",
                          "shortKey": "PLANB",
                          "type": "chain",
                          "enabled": false,
                          "link": {
                              "href": "http://localhost:8085/rest/api/latest/plan/PROJ-PLANB",
                              "rel": "self"
                          },
                          "key": "PROJ-PLANB",
                          "name": "Project - Plan B",
                          "planKey": {
                              "key": "PROJ-PLANB"
                          }
                      },
                      ...
                  ]
              }
          }
          

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rsperafico Rafael Sperafico (Inactive)
              Votes:
              8 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated: