-
Notifications
You must be signed in to change notification settings - Fork 34
Y25-286 - Add study accessioning checklist #5499
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
base: y25-705-calm-agressive-validation
Are you sure you want to change the base?
Y25-286 - Add study accessioning checklist #5499
Conversation
This is better practise in Rails
…dy-accessioning-checklist
andrewsparkes
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good other than the minor comment about double negatives.
I think it needs changing as it's confusing to understand.
| <% if @study.study_metadata.strategy_not_applicable? %> | ||
| <%= bad_icon %> Study release strategy is <strong><%= Study::DATA_RELEASE_STRATEGY_NOT_APPLICABLE.humanize %></strong> - <%= link_to('Change release strategy', edit_study_path(@study)) if can?(:edit, @study) %> | ||
| <% else %> | ||
| <%= good_icon %> Study release strategy is not <%= Study::DATA_RELEASE_STRATEGY_NOT_APPLICABLE.humanize %> <%= tag.strong { "(#{@study.study_metadata.data_release_strategy.humanize})" } %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noticed in the screenshots there were double negatives. Like 'is not Not applicable' and 'is not Never'.
Consider different wording?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe 'cannot be' instead of 'is not'?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or 'should not be'
still not great for clarity, anyway you get my point
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good suggestion, thanks.
I've changed the wording to focus on what the current study settings are, rather than what they are not.
|
Thanks for the suggestions @andrewsparkes I've updated the wording and formatting as below: |
|
|
||
| def dac_accession | ||
| @study = Study.find(params[:id]) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need an accessioning_enabled guard clause?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added and refactored
|
|
||
| def policy_accession | ||
| @study = Study.find(params[:id]) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need an accessioning_enabled guard clause?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yip, added and refactored
| end | ||
|
|
||
| def fresh_sevice_link | ||
| def fresh_service_link |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😄
|
I've made some small UX changes, including updating the warning message on @neilsycamore's request:
@andrewsparkes and @BenTopping would you please take another look? |




Closes #5417
Merges into #5486
See #5500 for a related accessioning permissions issue that was discovered as part of this work.
Changes proposed in this pull request
Provides vital feedback on the accession-ability of studies and samples.
Accession all sampleslink if user is not permitted to accessionAccessioningDisabledErrorwithaccessioning_enabled?fresh_sevice_linktypoaccessioning_enabled?- a single, global accessioning-enabled check, same asconfigatron.accession_samplespermitted_to_accession?- an explicit check for user permission to accession, same ascan?(:accession, object)Study#samples_accessionable?- does a study meet eligibility criteria for accessioning samplesSample#should_be_accessioned?- does a sample meet eligibility criteria for being accessionedScreenshots
Instructions for Reviewers
[All PRs] - Confirm PR template filled
[Feature Branches] - Review code
[Production Merges to
main]- Check story numbers included
- Check for debug code
- Check version