15768: fixed rename of single collection bug Arvados-DCO-1.1-Signed-off-by: Lisa...
authorLisa Knox <lisaknox83@gmail.com>
Wed, 11 Oct 2023 14:32:56 +0000 (10:32 -0400)
committerLisa Knox <lisaknox83@gmail.com>
Wed, 11 Oct 2023 14:32:56 +0000 (10:32 -0400)
src/store/workbench/workbench-actions.ts

index 294aeaf849bc001d6b8ee043f84862c32b1b9734..bf21bd3fee018c61b4d8886d62137841af14e423 100644 (file)
@@ -437,7 +437,7 @@ export const copyCollection = (data: CopyFormDialogData) => async (dispatch: Dis
     }
 
     async function copySingleCollection(copyToProject: CollectionCopyResource) {
-        const newName = data.isSingle ? data.name : `Copy of: ${copyToProject.name}`;
+        const newName = data.isSingle || collectionsToCopy.length === 1 ? data.name : `Copy of: ${copyToProject.name}`;
         try {
             const collection = await dispatch<any>(
                 collectionCopyActions.copyCollection({