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

Analyst not required but if missing analysis cannot be transitioned #2267

Open
mikejmets opened this issue Oct 11, 2017 · 1 comment
Open

Comments

@mikejmets
Copy link
Contributor

Steps to reproduce

Create a AR
Add a result value for an analyses and do NOT select an analyst

Current behavior

That analysis will not be transitioned and cannot be transition thereafter.

Expected behavior

Either the analyst field must be mandatory or the user has a way to add the analyst after submission

@mikejmets
Copy link
Contributor Author

mikejmets commented Oct 11, 2017

For BC I decided to make analyst mandatory and added the following code to browser/analysisrequest/workflow.py

            if uid in analysts and analysis_active:
                if len(analysts[uid]) == 0:
                    title = safe_unicode(analysis.getService().Title())
                    msgid = _('Analyst for ${analysis} is required.',
                              mapping={'analysis': title})
                    message = safe_unicode(t(msgid))
                    self.context.plone_utils.addPortalMessage(message, 'error')
                    continue
                analysis.setAnalyst(analysts[uid])

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

No branches or pull requests

1 participant