Skip to content

Conversation

@qqmyers
Copy link
Member

@qqmyers qqmyers commented Aug 13, 2025

What this PR does / why we need it: Prior changes to make DOIs fully case insensitive had a bug that also made Handles (which are case sensitive) fail PID recognition when the shoulder is specified as lower case. This PR corrects the bug to only use a toUpperCase() on the shoulder for case-insensitive PID types. It also updates the tests to use a non-empty Handle shoulder and verify that comparisons are case sensitive.

Which issue(s) this PR closes:

Special notes for your reviewer:

Suggestions on how to test this: Since we don't have a Handle setup, rely on the unit test, regression test. The submitter of the issue may be able to test the fix as well.

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?: inc.

Additional documentation:

@qqmyers qqmyers added the Size: 3 A percentage of a sprint. 2.1 hours. label Aug 13, 2025
@qqmyers qqmyers moved this to Ready for Triage in IQSS Dataverse Project Aug 13, 2025
@qqmyers qqmyers added this to the 6.8 milestone Aug 13, 2025
@ofahimIQSS ofahimIQSS moved this from Ready for Triage to Ready for Review ⏩ in IQSS Dataverse Project Aug 19, 2025
@coveralls
Copy link

Coverage Status

coverage: 23.464% (+0.002%) from 23.462%
when pulling b1ef66b on GlobalDataverseCommunityConsortium:IQSS/11592-HandleFix
into de2b48f on IQSS:develop.

@cmbz cmbz added the FY26 Sprint 5 FY26 Sprint 5 (2025-08-27 - 2025-09-10) label Aug 28, 2025
@stevenwinship stevenwinship self-assigned this Sep 2, 2025
@stevenwinship stevenwinship moved this from Ready for Review ⏩ to In Review 🔎 in IQSS Dataverse Project Sep 2, 2025
assertEquals(pid1String, pid3.asString());
assertEquals("hdl1", pid3.getProviderId());

// Test case sensitivity - a handle with uppercase "TEST" should not match the hdl1 provider
Copy link
Contributor

@stevenwinship stevenwinship Sep 2, 2025

Choose a reason for hiding this comment

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

This comment leads me to believe you will be comparing the uppercase "TEST" of pid4 to the lowercase "test" in pid1String showing they are not equal.

Maybe add:
assertNotEquals(pid4.asString(), pid1String);

Copy link
Member Author

Choose a reason for hiding this comment

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

? - this test has nothing to do with pid1 other than all 4 tests use the hdl1 provider defined around line 110. Line 110 itself defines the hdl1 provider as having the lower case 'test' shoulder, so hdl4 which uses upper case won't match it. In this case, pid4String should still be recognized as a Handle, so the assertEquals on 311 should work (the string form of the pid equals the original string), but it won't be recognized by the hdl1 provider, only the UnmanagedHandlePidProvider (tested on line 312).

Copy link
Contributor

Choose a reason for hiding this comment

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

My point was there should be a negative test showing that "test" isn't equal to "TEST"

@qqmyers qqmyers removed their assignment Sep 2, 2025
@github-project-automation github-project-automation bot moved this from In Review 🔎 to Ready for QA ⏩ in IQSS Dataverse Project Sep 2, 2025
@stevenwinship stevenwinship removed their assignment Sep 2, 2025
@ofahimIQSS ofahimIQSS self-assigned this Sep 2, 2025
@ofahimIQSS ofahimIQSS moved this from Ready for QA ⏩ to QA ✅ in IQSS Dataverse Project Sep 2, 2025
@ofahimIQSS
Copy link
Contributor

Tests are passing - no issues found. Going to merge.

@ofahimIQSS ofahimIQSS merged commit fde9065 into IQSS:develop Sep 3, 2025
15 checks passed
@github-project-automation github-project-automation bot moved this from QA ✅ to Merged 🚀 in IQSS Dataverse Project Sep 3, 2025
@ofahimIQSS ofahimIQSS removed their assignment Sep 3, 2025
@scolapasta scolapasta moved this from Merged 🚀 to Done 🧹 in IQSS Dataverse Project Sep 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FY26 Sprint 5 FY26 Sprint 5 (2025-08-27 - 2025-09-10) Size: 3 A percentage of a sprint. 2.1 hours.

Projects

Status: Done 🧹

Development

Successfully merging this pull request may close these issues.

Handle.net PIDs - exception creating new dataset in Dataverse 6.5-6.6 after update from 6.4

5 participants