akvo / akvo-product-design

Products Design Documents
GNU Affero General Public License v3.0
12 stars 9 forks source link

Data approval workflow (MVP) #82

Closed mtwestra closed 7 years ago

mtwestra commented 9 years ago

There is a need to implement an approval workflow in FLOW. This means that: 1) on the survey level, there should be a checkbox 'Data needs approval' 2) When this is checked, raw data that comes in will be in an 'unapproved' state. Users with the right permissions can approve them individually, or in bulk.

mtwestra commented 9 years ago

Perhaps this should be a setting on the survey?

Needs to have a related permission as well

muloem commented 9 years ago

Interestingly enough this feature used to be present and we deprecated it. I think users felt it got in the way but perhaps @iperdomo has better context as to why.

mtwestra commented 8 years ago

Proposal for technical design: https://github.com/akvo/akvo-product-design/blob/17c5f9d207f34ab034902ce087dec5c5b624b4dd/FLOW/Features/82-approval-workflow/TechnicalDesign.md

janagombitova commented 8 years ago

Here you can track the current discussion on the implementation from the users' point of view as well as user stories and background information:

User stories and scenarios document https://docs.google.com/document/d/1BKJCBYmlgrgVcJ4W7FzLLQQCxPJVm-A0NofiAW4pZVY/edit

Feature definition document https://docs.google.com/document/d/1ladrDGFMizo1bXS9r2W9iv6og-mCUb8uBIppHgu6jeA/edit

mtwestra commented 8 years ago

More inspiration: How sharepoint handles 'approval workflow': https://support.office.com/en-us/article/All-about-Approval-workflows-078c5a89-821f-44a9-9530-40bb34f9f742

http://www.cardinalpointsolutions.com/PDFs/Taking%20the%20Work%20out%20of%20Workflow%20with%20PeopleSoft%20Approval%20Framework.pdf

https://docs.oracle.com/cd/E13228_01/fscm9pbr0/eng/psbooks/scin/chapter.htm?File=scin/htm/scin03.htm

All of these use the concept of actions that the approver takes: "approve, deny, hold and push pack", or " approve or reject the item, to request a change in the item, to reassign the task, or to cancel or delete the task". From the mockups by Kiarii, this might be something useful

mtwestra commented 8 years ago

Following the mockups by Kiarii, here is a proposal for the technical implementation.

Mockups:

Data structure

1) introduce a 'workflowGroup' kind, with properties:

2) introduce a 'workflowItem' kind, with properties

3) introduce a 'workflowItemHistory' kind, with properties

4) introduce a 'workflowPermission' kind, with properties:

5) add a 'workflowEnabled' flag to the surveyGroup kind 6) add a 'workflowGroup' field to the surveyGroup kind 7) add a 'workflowItemId' field to the datapoint kind (surveyedLocale kind): foreign key to the workflowItem 8) add a 'workflowStatusId' field to the datapoint kind: Enum with types "APPROVED, REJECTED, PENDING"

Dashboard

Backend

In addition to adding the new kinds described above:

janagombitova commented 8 years ago

Functional design document

https://github.com/akvo/akvo-product-design/blob/f8fa0af5be2e1337b74f1cb00ffc926751fa3554/FLOW/Features/82-approval-workflow/FunctionalDesign%20DRAFT.md

Mockups (most current version):

janagombitova commented 8 years ago

Review of initial implementation and proposed changes

This feature is defined and part of our contractual obligations to SNV together with webforms. The initial planning was to deliver the features in the beginning of 2016 and now the deadline is moved to June 2016. Together with @muloem @mtwestra and @LarsSjogreen we looked at the planning and available resources and agreed that we will not be able to deliver both Webforms and Workflow at the same time. As the workflow has higher priority for SNV programmes (and the functionality around webforms can still be done with the app) we have decided to change the planning and focus first on workflow.

Secondly, we have decided to review the design created by @Kiarii and define a MVP which will not involve multiple UI changes to the dashboard, reuse as many existing components as possible and implement the functionality in the current dashboard structures. We will implement the designed mockups in later iterations.

Changes to original feature

Implementation steps on the MVP:

Existing documentation on the "original" feature

janagombitova commented 7 years ago

The agreed upon requirements for this functionality have been finished with 1.9.17 release. The implementation is currently released to two partner instances and is being tested. Around July/August we will review the implementation to learn:

After that we will review and decide on the next steps that will be covered in a separate issue.