Skip to content
Open
Show file tree
Hide file tree
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: 3 additions & 0 deletions packages/components/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ module.exports = {
LABKEY: {
contextPath: '/labkey',
container: {
id: 'e28ed3a3-4d74-103b-9678-6554da263543',
path: '/DefaultTestContainer',
parentId: '01b94403-4179-1039-a799-ea54f212702c',
parentPath: '/ParentTestContainer',
formats: {
dateFormat: "yyyy-MM-dd",
dateTimeFormat: "yyyy-MM-dd HH:mm",
Expand Down
5 changes: 5 additions & 0 deletions packages/components/releaseNotes/components.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# @labkey/components
Components, models, actions, and utility functions for LabKey applications and pages

### version TBD
*Released*: TBD February 2026
- GitHub Issue 830: Assay design add transform script webdav path doesn't resolve from subfolder
- AssayProtocolModel.container to compare domain id to the container.parentId to get parentPath when applicable

### version 7.18.0
*Released*: 17 February 2026
- Update `FilterStatus` to optionally include an "Add Filter" button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,44 @@ describe('AssayProtocolModel', () => {
expect(existingModel.container).toBe('Test Container');
});

test('by container id', () => {
let existingModel = AssayProtocolModel.create({
protocolId: 1,
name: 'Test Assay Protocol',
domains: [
{
name: 'Sample Fields',
container: 'e28ed3a3-4d74-103b-9678-6554da263543', // see jest.config.js
},
],
});
expect(existingModel.container).toBe('/DefaultTestContainer');

existingModel = AssayProtocolModel.create({
protocolId: 1,
name: 'Test Assay Protocol',
domains: [
{
name: 'Sample Fields',
container: '01b94403-4179-1039-a799-ea54f212702c', // see jest.config.js
},
],
});
expect(existingModel.container).toBe('/ParentTestContainer');

existingModel = AssayProtocolModel.create({
protocolId: 1,
name: 'Test Assay Protocol',
domains: [
{
name: 'Sample Fields',
container: '01b94403-bogus-ea54f212702c',
},
],
});
expect(existingModel.container).toBe('01b94403-bogus-ea54f212702c');
});

test('domainContainerId', () => {
const newModel = AssayProtocolModel.create({
name: 'Test Assay Protocol',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,14 @@ export class AssayProtocolModel extends ImmutableRecord({
get container(): string {
const container = new Container(getServerContext().container);
const domainContainerId = this.domainContainerId;

return this.isNew()
? getAppHomeFolderPath(container)
: domainContainerId === container.id
? container.path
: domainContainerId;
const domainContainerPath =
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure this is the best way to fix this issue. Perhaps the path should be queried if containerId doesn't match, before constructing webdav url? This wouldn't work if editing a designer created from Shared project

domainContainerId === container.id
? container.path
: domainContainerId === container.parentId
? container.parentPath
: domainContainerId;

return this.isNew() ? getAppHomeFolderPath(container) : domainContainerPath;
}

get domainContainerId(): string {
Expand Down