Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/492 publish dataset with compare versions #551

Merged
merged 17 commits into from
Jan 6, 2025

Conversation

ekraffmiller
Copy link
Contributor

@ekraffmiller ekraffmiller commented Nov 18, 2024

What this PR does / why we need it:

This PR adds a use case for comparing dataset versions, and uses it to add a property to the Dataset object, a boolean that indicates whether the next version should be a major or minor version update.
The boolean requiresMajorVersionUpdate will be true if the draft contains added, removed or replaced files. If this boolean is true, then the PublishDatasetModal will include help text describing the major version update.

Which issue(s) this PR closes:

Special notes for your reviewer:

Suggestions on how to test this:

  1. Create and publish a dataset.
  2. Edit the metadata of the dataset, and click the Publish button. The PublishDatasetModal will show an option for choosing either minor or major version update.
  3. Publish the dataset, and then create another draft version, with an uploaded, removed or replaced file.
  4. Click the publish button again, and the PublishDatasetModal should display help text about the required major version update.

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

Is there a release notes update needed for this change?:

Additional documentation:

@coveralls
Copy link

coveralls commented Nov 18, 2024

Coverage Status

coverage: 97.486% (-0.02%) from 97.508%
when pulling cb7403e on feature/492-publish-dataset-with-compare-versions
into 9170126 on develop.

@ekraffmiller ekraffmiller marked this pull request as ready for review November 20, 2024 15:25
@ekraffmiller ekraffmiller linked an issue Nov 20, 2024 that may be closed by this pull request
@ekraffmiller ekraffmiller added FY25 Sprint 10 FY25 Sprint 10 (2024-11-06 - 2024-11-20) SPA: Dataset page (View) Size: 3 A percentage of a sprint. 2.1 hours. Original size: 3 SPA.Q4.10 Resolve TODOs and tech debt GREI Re-arch GREI re-architecture-related and removed Waiting labels Nov 20, 2024
@g-saracca g-saracca self-assigned this Nov 21, 2024
@cmbz cmbz added the FY25 Sprint 11 FY25 Sprint 11 (2024-11-20 - 2024-12-04) label Nov 21, 2024
Copy link
Contributor

@g-saracca g-saracca left a comment

Choose a reason for hiding this comment

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

Looks good, just some questions

@g-saracca g-saracca removed their assignment Nov 25, 2024
@ekraffmiller
Copy link
Contributor Author

Great job @ekraffmiller , approving! Just one comment, you are mapping the js-dataverse versionDiff in toDatasetVersionDiff but not changing any property, maybe we don't need the mapper at all?

Thanks! Yes, I thought maybe we didn't need the mapper, but wanted to follow the convention used in the mapping logic. Feel free to remove it if you want.

@ofahimIQSS ofahimIQSS self-assigned this Nov 25, 2024
@ofahimIQSS ofahimIQSS removed their assignment Nov 27, 2024
@ofahimIQSS ofahimIQSS self-assigned this Dec 4, 2024
@cmbz cmbz added the FY25 Sprint 12 FY25 Sprint 12 (2024-12-04 - 2024-12-18) label Dec 5, 2024
@g-saracca
Copy link
Contributor

@ekraffmiller , we have some merge conflicts and I think js-dataverse could now be update to use latest alpha 👍🏼

@ekraffmiller ekraffmiller force-pushed the feature/492-publish-dataset-with-compare-versions branch from 7a0d850 to e2e050c Compare December 16, 2024 18:09
@ekraffmiller
Copy link
Contributor Author

@ekraffmiller , we have some merge conflicts and I think js-dataverse could now be update to use latest alpha 👍🏼

Ok, I resolved the conflicts and updated to alpha.8

@ofahimIQSS
Copy link
Contributor

need to resolve merge conflicts on this one

@ofahimIQSS ofahimIQSS removed their assignment Dec 18, 2024
@cmbz cmbz added the FY25 Sprint 14 FY25 Sprint 14 (2025-01-02 - 2025-01-15) label Jan 2, 2025
g-saracca
g-saracca previously approved these changes Jan 3, 2025
Copy link
Contributor

@g-saracca g-saracca left a comment

Choose a reason for hiding this comment

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

Approved again as I solved merge conflicts and dismissed the approval

@g-saracca g-saracca assigned ofahimIQSS and unassigned ekraffmiller Jan 3, 2025
@ofahimIQSS
Copy link
Contributor

Came across an issue with this PR - see video below.
Create new dataset and publish
Upload a file and publish Dataset again

Error message displayed: An error occurred while publishing the dataset. There was an error when writing the resource. Reason was: [403] Cannot release as minor version. Re-try as major release.

Screen.Recording.2025-01-03.at.2.48.31.PM.mov

@ekraffmiller
Copy link
Contributor Author

Thanks for catching that @ofahimIQSS! I committed a fix, ready to re-test now.

@ofahimIQSS
Copy link
Contributor

@ofahimIQSS ofahimIQSS merged commit 9e91afa into develop Jan 6, 2025
10 of 14 checks passed
@ofahimIQSS ofahimIQSS deleted the feature/492-publish-dataset-with-compare-versions branch January 6, 2025 15:15
@ofahimIQSS ofahimIQSS removed their assignment Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FY25 Sprint 10 FY25 Sprint 10 (2024-11-06 - 2024-11-20) FY25 Sprint 11 FY25 Sprint 11 (2024-11-20 - 2024-12-04) FY25 Sprint 12 FY25 Sprint 12 (2024-12-04 - 2024-12-18) FY25 Sprint 14 FY25 Sprint 14 (2025-01-02 - 2025-01-15) GREI Re-arch GREI re-architecture-related Original size: 3 Size: 3 A percentage of a sprint. 2.1 hours. SPA: Dataset page (View) SPA.Q4.10 Resolve TODOs and tech debt
Projects
None yet
5 participants