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

Corner case in report approval #3144

Open
gjvoosten opened this issue Aug 13, 2020 · 0 comments
Open

Corner case in report approval #3144

gjvoosten opened this issue Aug 13, 2020 · 0 comments
Assignees
Labels

Comments

@gjvoosten
Copy link
Collaborator

gjvoosten commented Aug 13, 2020

Describe the bug
There is a corner case where if a report is submitted, then afterwards the approval flow is changed, the workflow may show incorrect information.

To Reproduce
Steps to reproduce the behavior:

  1. make sure there's a default approval flow (should be the case in development with the default dataset)
  2. log in as jack (of org EF 2.1, which has no approval workflow) and create a report
  3. fill in all required fields, save the report and submit it
  4. the workflow should state that the default approval flow applies
  5. log in as arthur and make henry an approver for EF 2.1
  6. log in as henry; who should have 0 reports pending his approval
  7. still as henry, click on EF 2.1's reports in the last 7 days
  8. the first report should be the one just created by jack; the workflow would appear to indicate that henry is the current approver
  9. click Read report and see that there is no Approve button

Expected behavior
Since we probably don't want to change the workflow of an already submitted report post factum, the workflow display should take a report's approvalStepUuid into account. But how to integrate this into the way the workflow is determined (Report::loadWorkflow)? The report's approvalStepUuid will not be present in the computed workflow, so where in the workflow are we? Maybe we need to check whether the approvalStepUuid is part of the defaultOrg workflow, and in that case, don't use the advisorOrg workflow but use the defaultOrg workflow. Although that is getting complicated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants