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

Sample details refactor/ metadata and details fixes #1227

Conversation

deepsidhu85
Copy link
Contributor

@deepsidhu85 deepsidhu85 commented Mar 24, 2022

Description of changes

What did you change in this pull request? Provide a description of files changed, user interactions changed, etc. Include how to test your changes.

Updated remaining locations where sample name link pointed to the samples page and replaced with launching the SampleDetailViewer. Fixed issue with sample metadata tab which wouldn't set a projectmetadatarole for a field if a previous role did not exist. Added logging statements. Updated tests. Refactored UI components to use Row/Col from ant design instead of Space

Related issue

Link to the GitHub issue this pull request addresses using the #issuenum format. If it completes an issue, use Fixes #issuenum to automatically close the issue.

Checklist

Things for the developer to confirm they've done before the PR should be accepted:

* [ ] CHANGELOG.md (and UPGRADING.md if necessary) updated with information for new change.
* [ ] Tests added (or description of how to test) for any new features.
* [ ] User documentation updated for UI or technical changes.

…to the metadata template field not being saved before adding an entry. Fixed edit metadata bug which was caused by a null metadata restriction for a project. Updated create new project and share samples views to pass the project id to the sample detail viewer
…e hyperlink to a button which launches the sample detail viewer from the linelist page. Fixed issue with paragraph editable display in sample detail viewer by adding padding to fields
…ed test for getting analysis outputfile info for user
@deepsidhu85 deepsidhu85 changed the title WIP: Sample details refactor/ metadata and details fixes Sample details refactor/ metadata and details fixes Mar 30, 2022
@deepsidhu85 deepsidhu85 requested a review from joshsadam March 30, 2022 23:01
Copy link
Contributor

@joshsadam joshsadam left a comment

Choose a reason for hiding this comment

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

This is coming along really well. Thanks for all your hard work. I am really starting to wonder about this as a modal. There is so much going on here. Keep going, but we definitely need to talk about it with Eric more.

@@ -170,13 +170,13 @@ public AnalysisSubmissionRepositoryImpl(DataSource dataSource,
+ " INNER JOIN analysis_submission_sequencing_object o ON asub.id = o.analysis_submission_id\n"
+ " INNER JOIN sample_sequencingobject sso ON sso.sequencingobject_id = o.sequencing_object_id\n"
+ " INNER JOIN sample s ON sso.sample_id = s.id\n"
+ " LEFT JOIN project_sample psample ON s.id = psample.sample_id\n"
+ " INNER JOIN project_sample psample ON s.id = psample.sample_id\n"
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't know anything about sql, but this looks like an expensive query. Perhaps Eric should have a look at it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think so too and probably something that should be updated in dev.


return new SampleDetails(sample, isModifiable, cartService.isSampleInCart(id));
Project project = null;
if (cartService.isSampleInCart(id) != null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Well I named that function poorly, sorry.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

All good! :)

@@ -40,7 +40,10 @@ export default function ShareAssociated() {
</Button>
}
>
<SampleDetailViewer sampleId={sample.id}>
<SampleDetailViewer
Copy link
Contributor

Choose a reason for hiding this comment

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

This will have to be updated into the metadata security branch

…splitting of logic for getting a list of SampleMetadataFieldEntry
@joshsadam joshsadam merged commit 22555b4 into phac-nml:sample-details-refactor Apr 5, 2022
@deepsidhu85 deepsidhu85 deleted the sample_details_refactor/_metadata_and_details_fixes branch May 27, 2022 16:56
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