You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When trying to move a file located in a dataset folder to another folder within the same dataset (related to issue 37), a duplicate listing of the same file was produced. The file was shown in the root of a database AND still in the original parent folder.
Since there doesn't seem to be functionality to move between folders of the same dataset, user tried to make a workaround. The idea was to move the file back into the root of the dataset, then move the file into a different folder within the same dataset. Although probably not intended to be used in this way, the user selected the api/datasets/moveBetweenDatasets endpoint.
It seems to be an issue with the api/datasets/{datasetId}/moveBetweenDatasets/{toDataset}/{fileId} endpoint not handling a case where a user tries to move the file into the same dataset.
To Reproduce
Steps to reproduce the behavior:
Upload a file to a dataset's folder (or select a file already uploaded to a dataset's folder)
Move the file from the dataset's folder into the root of the dataset using /datasets/{datasetId}/moveBetweenDatasets/{toDataset}/{fileId} (datasetId and toDataset being the same ID)
e.g. /api/datasets/1/moveBetweenDatasets/1/1234
Check the dataset's root for the file AND check the folder where the file was supposed to be moved from
See error where file is listed in both locations
Expected behavior
File is moved from the dataset folder into the root of the dataset, deleting the association with the old parent folder. Only 1 view/location of the file.
Desktop (please complete the following information):
OS: Windows 10
python 3.7 using API calls
Clowder Version 1.19.4
The text was updated successfully, but these errors were encountered:
I'd actually forgotten I posted this issue until my team encountered this issue again today:
My team recently was using the /api/datasets/{dsID}/moveBetweenDatasets/{newdsID}/{fileID} and /api/datasets/{newdsID}/moveFile/{newfolderID}/{fileID} endpoints to transfer files from one dataset to another and then into a folder in the new dataset. The workflow was tested on 2 files to start.
We noticed that for both cases, the same exact file (same ID) was shown to exist in 2 places (visible through an API pull of the file information and in UI):
File 1 was in the root of the new dataset and in the subfolder. This was resolved in the UI by using the "move" interface to move the root located file into the subfolder, where it seems the duplicate location association collapsed.
File 2 was in the old AND new dataset, where the breadcrumb path actually showed a dropdown for the multiple Spaces which we've never seen before in the UI.
The issue seems to be connected to moveBetweenDatasets because my team has successfully used the "moveFile" endpoint to move files around within a dataset before without issue.
Describe the bug
When trying to move a file located in a dataset folder to another folder within the same dataset (related to issue 37), a duplicate listing of the same file was produced. The file was shown in the root of a database AND still in the original parent folder.
Since there doesn't seem to be functionality to move between folders of the same dataset, user tried to make a workaround. The idea was to move the file back into the root of the dataset, then move the file into a different folder within the same dataset. Although probably not intended to be used in this way, the user selected the
api/datasets/moveBetweenDatasets
endpoint.It seems to be an issue with the
api/datasets/{datasetId}/moveBetweenDatasets/{toDataset}/{fileId}
endpoint not handling a case where a user tries to move the file into the same dataset.To Reproduce
Steps to reproduce the behavior:
Upload a file to a dataset's folder (or select a file already uploaded to a dataset's folder)
Move the file from the dataset's folder into the root of the dataset using
/datasets/{datasetId}/moveBetweenDatasets/{toDataset}/{fileId}
(datasetId
andtoDataset
being the same ID)e.g. /api/datasets/1/moveBetweenDatasets/1/1234
Check the dataset's root for the file AND check the folder where the file was supposed to be moved from
See error where file is listed in both locations
Expected behavior
File is moved from the dataset folder into the root of the dataset, deleting the association with the old parent folder. Only 1 view/location of the file.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: