akvo / akvo-flow

A data collection and monitoring tool that works anywhere.
http://akvo.org/products/akvoflow/
GNU Affero General Public License v3.0
65 stars 31 forks source link

Apply data approval workflow step to data points - MVP - estimated 39 #1664

Closed janagombitova closed 7 years ago

janagombitova commented 8 years ago

For all the background information on this feature and the decisions around the MVP please check: akvo/akvo-product-design#82

Details (draft) The workflow will be applied on the data point level thus when viewing the list of data points in the Monitoring tab we have added the column Data approval, which shows the current workflow status of a data point. Here is also the place where the user can change the status (see mockups for both types, ordered and unordered).

janagombitova commented 8 years ago

From planning poker meeting: Needs to be better defined (in more detail) and potentially broken down into smaller chunks. Questions like: What happens if a submission is disapproved on the 3rd step, is the 2nd one opened again? need to be answered.

janagombitova commented 8 years ago

Based on the discussion we had during the planning poker meeting, here are the mockups I could find and the ideas and understanding I have. Let's discuss this further once we reach to this issue.

Changing a workflow status for a data point

We are working with the analogy that data approval works as if the submitted forms move from one desk to another where they get checked and approved/disapproved by a particular person.

We have two types of data approval workflows:

In order to see which submission (data point) is in which stage/step of the data approval workflow we mark the datapoint with a status. The status is derived from the workflow step and the action the user took.

Unordered workflow:

Changing step on data point for an un-ordered workflow

How does the data point status change with the approval steps?

Surveys that have a workflow added to them will also have an extra column in the data preview (as well as in reports) which will show the current status of the data point. The status is based on the approval given (or not given) to a data point.

Unordered workflow

screen shot 2016-07-06 at 16 24 37

Ordered workflow:

Changing step on data point for an ordered workflow

screen shot 2016-07-06 at 16 26 34

How does the data point status change with the approval steps?

Surveys that have a workflow added to them will also have an extra column in the data preview (as well as in reports) which will show the current status of the data point. The status is based on the approval given (or not given) to a data point.

fullsizerender

Ordered approval workflow Example case: data approval holding 5 steps and each step has a different user responsible

@muloem and @joycarpediem What do you think? Let's discuss this once we get to this point in the build

janagombitova commented 8 years ago

Test plan

You will need all three surveys that you have assigned data groups to to have data points with data.

For Ordered approval groups with no user limitation

  1. Go to the Data tab and Monitoring subtab
  2. Open the survey that has an approval group assigned to it, but NO responsible users and click to find data
  3. Data points are shown in the list. In the new column Approval status all points have the 1st step and status 'pending'
  4. Any user (your current user, all your test users) can change the points approval status
  5. Click on the 1st points approval status > a window shows with all the possible steps. The 1st step shows the dropdown with the 3 statuses: Pending, Approved, Rejected; comment box; and Submit button
  6. Change the status of this point to Approved, write a short comment and hit submit
  7. For the 1st step you now see status Approved, with the timestamp, your user name and comment. The 2nd step is now open, status is Pending, you see the dropdown, comment box and submit button. Close the window
  8. Open the 2nd data point and change the status to "Pending". The 1st step is still open, but a history log is shown with status pending, timestamp, user name, no comment as you did not add any.
  9. Open 3rd data point and change status to "Rejected" and add a comment. the 1st step is still open, but a history log is shown.
  10. Open 4th data point and change status to "Approved" on the 1st step and also "Approved" on 2nd step. The 3rd step is not open and in "pending"
  11. Open 5th data point and change status to "Approved" on the 1st step and "Rejected" on the 2nd step. A history log is shown on the 2nd step and it remains open. The 3rd step is not opened yet.
  12. All 5 data points have now an updated Approval status.

For ordered approval groups with user limitations

(You are logged in user was assigned to step 2)

  1. In Monitoring subtab of the Data tab select your survey that has an ordered approval group and responsible users per steps assigned to it
  2. The data points are shown on the list of points and for the Approval status they all have 1st step - pending
  3. Open a data point, you cannot make any changes - you do not see the dropdown, comment box or submit for the 1st or any steps, not even step 2 that you are responsible for.
  4. Log out of the dashboard and log in with the test user account who is responsible for step 1
  5. Select the survey in the Monitoring tab again.
  6. Open a data point, you should now be able to change the point status for step 1
  7. For the 1st data point make the status approved and add a comment > the status change, timestamp and user name are logged down. The 2nd step is now in status 'pending' but there is no submit not comment box for you open to change it.
  8. For the 2nd data point change the status to 'pending'. Change is logged down, and the 1st step is still open while the 2nd step is still closed for editing
  9. For the 3rd data point change the status to 'rejected'. Change is logged down and the 1st step is still open while the 2nd step remains closed
  10. Log out of the dashboard and log in with the test user who is responsible for the 2nd step of the approval group.
  11. Select the survey in the monitored tab and you should see the changed statuses for the 3 data points.
  12. Open the point where the status is now in the 2nd step - pending. You cannot make any changes to the 1st step but only to the 2nd step. Approve the 2nd step. Now the status is in the 3rd step - pending, but you cannot edit it.
  13. Open the point where the status is in the 1st step - pending. You cannot make changes to the step.
  14. Open the point where the status is in the 1st step - rejected. You cannot make changes to the step.

For unordered approval groups with no user limitations

  1. In the Monitoring subtab of the Data tab, select the survey where you have an unordered approval group with no users assigned to it.
  2. Data points are shown in the list and the approval status is the default status (1st step in the approval group).
  3. Open the 1st data points approval status > you see a dropdown with all steps for this approval group, a comment box and a submit button.
  4. Select one step from the dropdown, write a comment and hit submit. The status is now logged down with the step name, time stamp, your name and comment you added.
  5. Repeat 4. twice. You should be able with all attempts to choose from all steps in the list regardless if they were selected before or not and each submission is logged down with the latests on the top of the list.
  6. Change the status of 2 more data points. Make sure each of the three points has a different status in the end.

For unordered approval groups with user limitations

  1. In the Monitoring subtab of the Data tab, select the survey where you have an unordered approval group with users per steps assigned to it.
  2. Data points are shown in the list and the approval status is the default status (1st step in the approval group).
  3. Open the 1st data points approval status > you see a dropdown with only the steps you are responsible for, a comment box and a submit button.
  4. Select is from the dropdown, write a comment and hit submit. The status is now logged down with the step name, time stamp, your name and comment you added.
  5. Repeat once more. You can only, with all attempts, choose from the steps you are responsible for in the list regardless if they were selected before or not and each submission is logged down with the latests on the top of the list.
  6. Change the status of 2 more data points.

Repeat the test plan in different browsers

janagombitova commented 8 years ago

Notes from testing

screen shot 2016-10-02 at 16 58 31

For Ordered approval groups with no user limitation

For Un-ordered approval groups with no user limitation

screen shot 2016-10-02 at 17 04 34

@muloem that is all so far - will add more in an hour or need. Need to relocate now

janagombitova commented 8 years ago

@muloem I would propose to ease up the plan and looking at the time - we can also perhaps 1st make sure ordered group work fine and leave unordered for the 2nd sprint

janagombitova commented 8 years ago

Hey @muloem,

I found another odd thing:

screen shot 2016-10-03 at 08 20 19
janagombitova commented 8 years ago

Notes from 2nd round of testing

Ordered group

Default step ordered group

If step is approved the following step is opened and shown in data point overview

screen shot 2016-10-03 at 10 30 37

Submitting a pending status

Rejected

Unordered group

janagombitova commented 8 years ago

@muloem here is the test I have run just now and I am not sure if what you shared is fixed or not, but I could still not submit a 'pending' status with a comment and did not get it logged down in the history. So what I am expecting with pending is:

Case 1:

Case 2:

data approval monitoring

muloem commented 8 years ago

@janagombitova ok noted. it should be sorted out now.

Also I just realised that perhaps comments will probably be over our usual 500xter limit. Should we impose the limit or store whatever they push in? It also means that @loicsans will have to adjust UI a bit to wrap the comment text.

janagombitova commented 8 years ago

@muloem and @loicsans I think 500 characters is quite a lot of text to write as a comment and think it should suffice for now, but that is just my personal feeling. What do you think?

@muloem Thanks. I am ready when you are

janagombitova commented 8 years ago

Notes from 3rd round of testing

(have tested only ordered group using survey: 1.9.11 UAT Folder - testing data approval > Jana tests > Tuesday test 1 (only testing ordered groups))

Homework from previous rounds: All done 👍

New notes

tested editing an approval group in use 👍

testing adding more data 👍

Pending (based on user feedback) - https://github.com/akvo/akvo-flow/issues/1778

Cannot close window if all steps are approved

screen shot 2016-10-04 at 13 58 10

screen shot 2016-10-04 at 14 11 23

Full page refresh

janagombitova commented 8 years ago

Test plan

for testing this issue on UAT please see test plan above https://github.com/akvo/akvo-flow/issues/1664#issuecomment-249536207

janagombitova commented 7 years ago

Notes from testing

All issue that relate to this test plan but will be handled separately:

For the remaining workflow the implementation passes the test plan 👍