Details
-
Fix
-
Status: Released (View Workflow)
-
Minor
-
Resolution: Fixed
-
2.2.2
-
None
-
None
Description
Current Situation
- The Copy API offers the functionality to copy, cut & paste folders with scheduling objects.
- To this purpose prefixes and suffixes are offered that prepend and append "copy" followed by a number to the object name. The number is chosen by increment in order to create a unique object name for the given object type (workflow, job resource etc.).
- If the source folder of the copy operation includes object names that make use of a "copy" prefix or suffix and mixed numbers as with "copy1", "copy7" etc. in the same folder, then the algorithm to generate the next free index number, for example "copy8", fails to detect the highest index number of object in the folder.
For example
- Folder_A
- workflow_a-copy1
- workflow_a-copy7
Subsequently the Copy API fails with a duplicate key entry error.
Desired Behavior
The Copy API should generate the next free index number to append to the prefix/suffix according to the highest existing number of any objects with the same name and type.