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

Give direct feedback on why you cannot publish a form #3715

Closed janagombitova closed 3 years ago

janagombitova commented 3 years ago

Once Salim is done creating his survey form, he needs to publish it to move it from a draft state to a state ready for data collection. With every change he then makes to a published form, the form version updates and this version is not published. Only after Salim publishes it again are the changes he made visible on the app and webforms for data collection.

Publishing is an important task in the workflow of setting up a data collection and data collection cannot start without it.

But how publishing happens today, has many issues:

With this issue, we aim to handle the last problem: How might we make it clear to Salim that he cannot publish the form just yet, as the survey form is not complete.

The other problems listed above are here to paint the overall picture.

janagombitova commented 3 years ago

Why are we looking at this problem, if we eventually want to improve/refactor the survey editor? If we look at the support issues that come in, a large number is about survey forms not publishing. The support hero then needs to download the survey form, check the structure and point to the user where they need to make changes. This tasks takes up our time but also removes the independence from the user.

We aim to go from 31% of support requests to 5%. (total of 184, 30 were about publishing in Flow Reamaze channel in 2020 + 27 cases Jana received directly)

Kiarii commented 3 years ago

We could use a modal dialog aka pop-up to notify Salim that the publishing process cannot proceed given a failure in the requirements check - fill in the blank. In this case, the dashboard would not show the dialog about checking the messages tab for the form publishing status

To be explicit enough about why a form publishing fails, we need to list all requirement checks and their failure points - that way the info provided in the modal dialog can be direct

The modal cuts a few UX corners (but is the lowest hanging fruit [more like the fruit on the ground]):

In form question validation (the higher fruit)

We need to consider the technical feasibility of in form validation for a number of reasons:

-- for future iterations: The publishing terminology would need realignment.

Kiarii commented 3 years ago

reasons for failing to publish shared by @janagombitova

the dependency check box is checked but no question selected the dependency check box is checked, question is selected but no options

This was in the past - I doubt it still happens, but just to put it all down:

  • questions miss question text (the actual question)

this is validated on the fly - you cant save if the question is blank

It is actually possible to save an empty group name; not sure if publishing catches this though

janagombitova commented 3 years ago

In the call with the team today we decided the following:

janagombitova commented 3 years ago

Smaller issues to ensure that when Salim is editing a question, the question structure is complete and thus the form structure is complete reducing the cases of why publishing might fail:

Kiarii commented 3 years ago

Modal texts suggestion

Screen Shot 2021-01-13 at 10 57 02

Incomplete QG highlighting

Screen Shot 2021-01-13 at 10 58 05

Incomplete question highlighting

Screen Shot 2021-01-13 at 10 58 48

Respective error message, upon expanding an incomplete question

Screen Shot 2021-01-13 at 11 00 59

Highlight styling

Lets stick to the red used in Flow

tangrammer commented 3 years ago

In relation to https://github.com/akvo/akvo-flow/issues/3715#issuecomment-758864604

  • Ensure question group name is set before enabling to save

@janagombitova does it means that it can't be equals to "New group - please change name"?

janagombitova commented 3 years ago

@tangrammer no. That is ok, not ideal of course, but still ok. It cannot be empty.

janagombitova commented 3 years ago

Yesterday evening I tested uat2, assuming what is merged is running there - version 20210119-100200.0d4c4112. My expectation was that once I create an incomplete form and hit publish, I will see the new pop up message and the group/question will get highlighted. That did not happen.

Secondly, my incomplete form got published. What is worrying me even more.

The form:

Steps I took:

  1. Created a form with 2 option questions and a few questions depending on them.
  2. I tried deleting one of the option questions - this was not allowed by Flow, awesome.
  3. I deleted one of the options from the other option question, knowing question 4 depends on it, option d. This question is now incomplete.
  4. There is one more question that depended on option c and d, question 3. This one is ok.

@tangrammer and @muloem can you please check what might be going on?

tangrammer commented 3 years ago

@muloem @janagombitova this commit should fix option 3, https://github.com/akvo/akvo-flow/commit/5e12898d4fab853e3d04ce8a1bab4122390d15cd (i forgot to adapt this part) also added a check for group names here https://github.com/akvo/akvo-flow/commit/137af7a41ee69a6af41b96a9e1d51b6803c809b4

both commits part of this PR https://github.com/akvo/akvo-flow/pull/3734

tangrammer commented 3 years ago

@janagombitova BTW "I tried deleting one of the option questions - this was not allowed by Flow, awesome." not sure what will happen when we copied/worked-with old surveys 🤔 perhaps this flow constraint wasn't there at that flow history point

janagombitova commented 3 years ago

@janagombitova BTW "I tried deleting one of the option questions - this was not allowed by Flow, awesome." not sure what will happen when we copied/worked-with old surveys 🤔 perhaps this flow constraint wasn't there at that flow history point

@tangrammer no indeed, for copying cases we need to imagine the situation where a form, where we had no saving validation at all is being copied - so work with the most extreme in mind. However, my comment was more acknowledging my surprise that we had this validation in place today, I was not aware/forgot.

janagombitova commented 3 years ago

For now, we decided to handle checking dependencies. The other reasons why a form may be incomplete (missing options and text and group names) have not been addressed in this iteration. We decided to not add this as such cases are seldom. We will see how many more support requests we get with such cases before we decide to implement it as we rather invest the time in improving the survey editor and other more valuable tasks.

The validation works as expected! Good job!