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
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion experiment/src/org/labkey/experiment/api/ExpDataImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.

return "data:" + new Path(getContainer().getId(), dataClassName, Integer.toString(getRowId())).encode();
}

@Override
Expand Down
Loading