-
-
Notifications
You must be signed in to change notification settings - Fork 152
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
Allow to edit Profiles in Samples for pre verified/published states #1657
Conversation
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.
Cool!. Would you mind to add a doctest to
a) ensure the function setProfiles
works properly (added analyses vs existing) and
b) when a profile is applied to a sample in "to_be_verified" status, the sample transitions back to "sample_received"
setup.runImportStepFromProfile(profile, "typeinfo") | ||
setup.runImportStepFromProfile(profile, "workflow") |
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.
You still need to keep setup.runImportStepFromProfile(profile, "workflow")
because of #1620: workflow definitions for InterpretationTemplate
and InterpretationTemplates
are located in senaite.core
profile.
"to_be_sampled", | ||
"sample_received", | ||
"attachment_due", | ||
"to_be_verified" |
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.
You missed a comma here, so the role mappings update do not apply to samples that are in "to_be_verified" or in "to_be_preserved" statuses.
Description of the issue/feature this PR addresses
This PR allows to edit analysis profiles inside samples view.
Note: Adding a profile will add all contained samples, but removing a profile will retain added ones.
Current behavior before PR
Analysis profiles could be only added during sample registration (Add form)
Desired behavior after PR is merged
Analysis profiles can be added/removed in the sample view when the sample is in a non verified/published state.
--
I confirm I have tested this PR thoroughly and coded it according to PEP8
and Plone's Python styleguide standards.