Uploaded image for project: 'JOC - JobScheduler Operations Center'
  1. JOC - JobScheduler Operations Center
  2. JOC-1855

JOC Cockpit should export folders recursively when using "Export individual Object" recursively

    XMLWordPrintable

Details

    • Fix
    • Status: Released (View Workflow)
    • Minor
    • Resolution: Fixed
    • None
    • 2.5.10, 2.6.7, 2.7.2
    • None
    • None

    Description

      Current Behavior:

      • When exporting the inventory from the export view using "Export individual Object" with the "Handle recursively" option, the selected folders are not exported recursively

      Steps to Reproduce:

      • Create a nested folder structure in the Inventory as shown in the attached Folder_recursive.png.
      • Export the inventory item from the root folder of the inventory by using "Export individual Object" with the "Handle recursively" option, 
      • Check the exported folder. The subfolders are missing from the exported folder.

      Desired Behavior:

      • When exporting the inventory from the export view using "Export individual Object" with the "Handle recursively" option, the selected folders should be exported recursively

      When exporting inventory objects recursively the api endpoint should be used with the "recursive":true option for the items with "objectType":"FOLDER"

      When the "Handle recursively" option is selected it is sufficient to call the endpoint for the folders on the upper level. 

      When one single item is deselected, then the parent folder will no longer be handled recursivly. Only the selected folders and items will be exported where the subfolders will be handled recursively.

      Example:

      Handle resursive: True

      • /
      • item1
      • item2
      • Folder1
        • item3
        • item4
        • Folder2
      • Folder3
      • Folder4

      Selecting the root folder will select all items and folders

      Exporting this will result in a call that export / recursively (refer to the example below)

      Deselecting item 2 will result in a call to export item1 and Folder1, Folder2, Folder3, Folder4 recursively (as done in the example below but with entries for Folder1..4 instead of /

       
      Testing with a POST API call to /joc/api/inventory/export with the following JSON demonstrates that sub-folders are exported when "objectType": "FOLDER" and "recursive": true are specified:

      {"useShortPath":false,"exportFile":\{"filename":"test.zip","format":"ZIP"},"shallowCopy":\{"withoutInvalid":false,"releasables":{"releasedConfigurations":[{"configuration":{"path":"/","objectType":"FOLDER","recursive":true}}],"draftConfigurations":[\{"configuration":{"path":"/","objectType":"FOLDER","recursive":true}}]},"deployables":\{"draftConfigurations":[{"configuration":{"path":"/","objectType":"FOLDER","recursive":true}}],"deployConfigurations":[\{"configuration":{"path":"/","objectType":"FOLDER","recursive":true}}]}}}
      

      Attachments

        Activity

          People

            ZtRahul193 Rahul Patidar
            Pramokshi-Narawariya Pramokshi Narawariya
            Pramokshi Narawariya Pramokshi Narawariya
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: