Skip to content

Comments

IQSS/11990 Controlled Vocabulary Field editing error#11991

Merged
sekmiller merged 3 commits intoIQSS:developfrom
GlobalDataverseCommunityConsortium:IQSS/11990-controlledvocab_editing_error
Dec 1, 2025
Merged

IQSS/11990 Controlled Vocabulary Field editing error#11991
sekmiller merged 3 commits intoIQSS:developfrom
GlobalDataverseCommunityConsortium:IQSS/11990-controlledvocab_editing_error

Conversation

@qqmyers
Copy link
Member

@qqmyers qqmyers commented Nov 18, 2025

What this PR does / why we need it: This PR fixes the issue - where editing a single-value CVV field starting from a published version would also update the field in the published version (causing the version difference view to not show the change).

Which issue(s) this PR closes:

Special notes for your reviewer: Took a while to find, but relatively straight forward. When an edit is made from a published version, we make a copy of the version and all fields. For DatasetFields using ControlledVocabularyValues, the code just set the new field in the new version to share the array of values from the original version. When an edit was made, the change was to the shared array and thus got saved for both versions. A fix is to copy the values in the array rather than sharing the array.

I confirmed the issue on demo, and confirmed the fix on a test machine.

I would have expected the error to occur with fields like language, but it appears that when multiple values are used, the JSF is sending a new array rather than editing the existing one, so the fact that the original copy was shared doesn't matter.
I did not test the API, but I would guess the problem could occur there as well since it was related to the DatasetField.copy method.

W.r.t. release notes - the copy code is 11+ years old, so I'm assuming the bug is that old and affects basically all versions of Dataverse currently in use.

Not sure if this has been seen in any of the version differencing related issues.

Suggestions on how to test this: Per the issue, create and publish a dataset. Change the value in a CVV single value field (publication relationType or contributor type) and save. Check the version difference details or look at the published version and, before the PR, you'll see the new value in the published version.

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?: included

Additional documentation:

@qqmyers qqmyers added the Size: 3 A percentage of a sprint. 2.1 hours. label Nov 18, 2025
@qqmyers qqmyers moved this to Ready for Triage in IQSS Dataverse Project Nov 18, 2025
@qqmyers qqmyers added this to the 6.9 milestone Nov 18, 2025
@cmbz cmbz moved this from Ready for Triage to Ready for Review ⏩ in IQSS Dataverse Project Nov 20, 2025
@stevenwinship stevenwinship self-assigned this Nov 21, 2025
@stevenwinship stevenwinship moved this from Ready for Review ⏩ to In Review 🔎 in IQSS Dataverse Project Nov 21, 2025
@github-project-automation github-project-automation bot moved this from In Review 🔎 to Ready for QA ⏩ in IQSS Dataverse Project Nov 21, 2025
@stevenwinship stevenwinship removed their assignment Nov 21, 2025
@cmbz cmbz added the FY26 Sprint 11 FY26 Sprint 11 (2025-11-20 - 2025-12-03) label Nov 22, 2025
@qqmyers qqmyers added the Type: Bug a defect label Nov 25, 2025
@sekmiller sekmiller self-assigned this Dec 1, 2025
@sekmiller sekmiller moved this from Ready for QA ⏩ to QA ✅ in IQSS Dataverse Project Dec 1, 2025
@sekmiller sekmiller merged commit 0ee4268 into IQSS:develop Dec 1, 2025
15 checks passed
@github-project-automation github-project-automation bot moved this from QA ✅ to Merged 🚀 in IQSS Dataverse Project Dec 1, 2025
@scolapasta scolapasta moved this from Merged 🚀 to Done 🧹 in IQSS Dataverse Project Dec 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FY26 Sprint 11 FY26 Sprint 11 (2025-11-20 - 2025-12-03) Size: 3 A percentage of a sprint. 2.1 hours. Type: Bug a defect

Projects

Status: Done 🧹

Development

Successfully merging this pull request may close these issues.

Editing a Controlled Vocabulary field can update published version

4 participants