Skip to content

3276 clone a dataset#3278

Merged
lbownik merged 11 commits into
developfrom
3276_clone_a_dataset
May 13, 2026
Merged

3276 clone a dataset#3278
lbownik merged 11 commits into
developfrom
3276_clone_a_dataset

Conversation

@lbownik
Copy link
Copy Markdown
Contributor

@lbownik lbownik commented May 7, 2026

@lbownik lbownik requested a review from rscipien May 7, 2026 12:33
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui"
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
xmlns:jsf="http://xmlns.jcp.org/jsf" xmlns:o="http://omnifaces.org/ui"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be in new line xmlns:o="http://omnifaces.org/ui"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed


}

private void copyVieldValuesFromSourceDataset() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo copyVieldValuesFromSourceDataset

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

groupAndUpdateFlagsForEdit(datasetFields, this.dataset.getOwner().getMetadataBlockRootDataverse());

if(this.sourceDatasetId != null) {
copyVieldValuesFromSourceDataset();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why cloning is inside resetDatasetFields?
Looks like reset method hide this cloning functionality

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so that is works with data set template mechanism, a user cloning dataset can selet a template on dataset creation page that also contains predefined field values. then new dataset values are fielst powied form template and then optioanlly overwritten by values from cloned dataset.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resetDatasetFields(); is invoked tom init() in line 226 and from updateSelectedTemplate(..) in line 240

@@ -0,0 +1,95 @@
<!DOCTYPE html>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this files should be named cloneDatasetDialog?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this dialog has been used to create dataset so far, and has been repurposed to also enable cloning which is a creation operation as well so ... let's leave the name.

@rscipien rscipien assigned lbownik and unassigned rscipien May 12, 2026
@rscipien rscipien assigned rscipien and unassigned lbownik May 13, 2026
@lbownik lbownik force-pushed the 3276_clone_a_dataset branch from a24f129 to be3d909 Compare May 13, 2026 08:23
@lbownik lbownik merged commit fc4c4bb into develop May 13, 2026
1 check passed
@lbownik lbownik deleted the 3276_clone_a_dataset branch May 13, 2026 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants