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

Customizable File Templates for Sources, Sample Types & Assay Designs #6167

Merged
merged 9 commits into from
Dec 30, 2024

Conversation

XingY
Copy link
Contributor

@XingY XingY commented Dec 20, 2024

Rationale

Custom import templates were previously supported by overriding the the datatype's query metadata xml by providing the webdav location of an uploaded file. This set of PRs allows users to manage custom templates from app UI.

Related Pull Requests

Changes

  • Created UpdateDomainImportTemplateAction api to upload custom template files and save domain template settings to query xml at query.querydef.metadata
  • Modified getQueryDetailsAction to include available status of import templates
  • Added CustomImportTemplates product feature

@XingY XingY marked this pull request as ready for review December 26, 2024 17:46
@XingY XingY requested a review from cnathe December 26, 2024 20:09

public String getDomainFileDirectory()
{
return getKindName();
Copy link
Contributor

Choose a reason for hiding this comment

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

do we want toLowerCase() for these? maybe it doesn't matter but the other dir names seem to all be lowercase.

api/src/org/labkey/api/util/FileUtil.java Outdated Show resolved Hide resolved
if (!template_.second.toLowerCase().contains("exportexceltemplate"))
existingCustomTemplates.add(template_);
}
if (!updatedTemplates.equals(existingCustomTemplates))
Copy link
Contributor

Choose a reason for hiding this comment

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

since these vars are both ArrayLists, will they ever be considered equal? From the UI, I opened the manage templates modal for a sample type that already had 2 custom tempaltes > edited the label for one and then put the label back to what it was > clicked Save. The code still went into this if statement.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm.. for this scenario described, it doesn't go inside the if block for me.

@XingY XingY requested a review from cnathe December 27, 2024 00:53
Comment on lines 8368 to 8370
QueryDef queryDef = null;
if (queryDef == null)
queryDef = QueryManager.get().getQueryDef(container, schemaName, queryName, false);
Copy link
Contributor

Choose a reason for hiding this comment

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

queryDef is always null here so not sure that if statement is needed.

Suggested change
QueryDef queryDef = null;
if (queryDef == null)
queryDef = QueryManager.get().getQueryDef(container, schemaName, queryName, false);
QueryDef queryDef = QueryManager.get().getQueryDef(container, schemaName, queryName, false);

@XingY XingY merged commit dad97c9 into develop Dec 30, 2024
4 checks passed
@XingY XingY deleted the fb_importTemplates branch December 30, 2024 20:37
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