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

Fix notebook data reference #6156

Merged
merged 1 commit into from
Dec 18, 2024
Merged

Fix notebook data reference #6156

merged 1 commit into from
Dec 18, 2024

Conversation

XingY
Copy link
Contributor

@XingY XingY commented Dec 17, 2024

Rationale

The documentId for dataclass data include the dataclass name. When the dataclass name contains special characters such as "/", the documentId cannot be parsed correctly.

SMProFolderExclusionTest.testExistingReferencesWithUpdatedExclusion

Related Pull Requests

Changes

  • encode datatype name when generating documentid for search results

@@ -633,7 +633,8 @@ public String getDocumentId()
ExpDataClass dc = getDataClass(null);
if (dc != null)
dataClassName = dc.getName();
return "data:" + new Path(getContainer().getId(), dataClassName, Integer.toString(getRowId()));
// why not just data:rowId?
Copy link
Contributor

Choose a reason for hiding this comment

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

good question. I'm not sure why the dataClassName is needed. We don't use it for materials, for example. Probably done to make the id more human-readable in some way, but we don't make any concessions to that in other places, so I would guess data:rowId would work just fine.

The last revision of this method had this comment:

        // CONSIDER: use lsid so we can crack it later?  Include dataClassId?
        return "data:" + new Path(getContainer().getId(), Integer.toString(getRowId()));

But for materials, we don't even add the container id (certainly not needed for uniqueness.

@XingY XingY merged commit e7c85e0 into develop Dec 18, 2024
8 checks passed
@XingY XingY deleted the fb_elnSpecialChar branch December 18, 2024 17:57
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