Skip to content

Conversation

@cnathe
Copy link
Contributor

@cnathe cnathe commented Aug 18, 2025

Rationale

https://www.labkey.org/home/Developer/issues/issues-details.view?issueId=53586

Several places in the code generated PropertyURIs for a domain field by appending the encoded field name to the domain type URI prefix. This can create long PropertyURI values that exceed our 300 char limit. This PR updates the DomainUtil.createUniquePropertyURI() helper to replace the "encode field name" with a Lsid DB seq as we've moved towards for other URI related cases recently.

Related Pull Requests

Changes

  • Update DomainUtil.createUniquePropertyURI() to use LsidManager.getLsidPrefixDbSeq()
  • Use DomainUtil.createUniquePropertyURI() in several places instead of appending encoded field name

@cnathe cnathe self-assigned this Aug 18, 2025
Copy link
Contributor

@labkey-klum labkey-klum left a comment

Choose a reason for hiding this comment

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

I pulled this down and ran with it locally. I'd be fine relying on the automated tests over a manual test pass.


// Return the "name" portion of the propertyURI after the hash
// Return the "name" portion of the propertyURI after the hash (Issue 30718)
private String getPropertyName(DomainProperty dp)
Copy link
Contributor

Choose a reason for hiding this comment

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

This behavior seems strange now. It's not really returning the property name for (most) new-style PropertyURIs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@labkey-jeckels I agree but I don't think this code can actually be hit for any newly created properties. It is executed for Sample Types that have the parentCol, idCol1, idCol2, idCol3 behavior which is deprecated. I couldn't find a way in the UI to create one of these. I took the XAR file from that issue 30718 and imported it locally and this code did the right thing for those PropertyURIs in the XAR. Thoughts on other ways to test this? Since you can't create these types of Sample Types anymore, I think the code should continue working for any existing property descriptors in those deprecated sample types.

Copy link
Contributor

Choose a reason for hiding this comment

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

Got it. I hadn't looked at the usages. Do you think we should mark this or related methods as deprecated?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I'll take a look

@cnathe cnathe merged commit 6c26a11 into develop Aug 23, 2025
10 of 13 checks passed
@cnathe cnathe deleted the fb_propertyURILength branch August 23, 2025 12:02
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.

6 participants