Themes - API - doing a PATCH to add programs clears out programs and releases

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Low
    • 11.7.0
    • Affects Version/s: None
    • Component/s: REST API, Themes
    • None
    • 1
    • Severity 3 - Minor
    • No
    • None

      Issue Summary

      If you perform a PATCH operation on the /themes endpoint to try and add program IDs to a theme, the result is a HTTP 204 and the blanking out of all existing program IDs and Release IDs.

      This happens with both add and replace operations.  It doesn't matter if you're trying to add 1 or multiple programs

      This was working fine in the past using the same exact endpoint and body 

      Steps to Reproduce

      1. Get a Theme ID for a theme that has at least 1 project and PI assigned to it
      2. Using the API, perform a PATCH on the themes endpoint to add a new project ID.  Example:
         
        [
            {
                "op": "add",
                "path": "/programids",
                "values":[
            
                    1223
                ]
            }
        ]
        

       

      Expected Results

      The Theme would include the newly added ProgramIDs as well as the previously existing ones.

      Actual Results

      All ProgramIDs and ReleaseIDs are removed from the Theme

      Workaround

      No known workaround at this time.

            Assignee:
            Yannick Genin
            Reporter:
            Todd Hall
            Votes:
            4 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: