Obs are saved even if the form is deleted before save

Description

As part of this card, we are handling all the below 2 issues.

Issue 1:

Description

As a user, when I add a forms 2.0 form and delete the form and click and save the deleted form observation should not get saved. But right now the observations are saved.

Steps to reproduce:

  • Create and publish a forms 2.0 form (name of the form is Test)

  • Go to consultation page and add the form and fill observations

  • Delete the form

  • Click on Save

Here the deleted observations are also getting save which should not.

Acceptance Criteria:

  • When a form is deleted with filled observations and click on save, observations should not be saved

Issue 2:

  • Current Behaviour: Form save event is called for deleted forms

  • . Expected Behaviour: Form save event should not be called for the deleted forms

Acceptance Criteria:

  • Form Save event should get triggered when form is added and observations are filled.

  • Form Save event should not get triggered when form is added and deleted.

P.S: Form Save Event - Script which gets triggered for forms 2.0 when we click on save

PR link:

Bahmni apps:

Attachments

5

Activity

Abhinab Bharali September 21, 2021 at 1:33 PM

Yes . I misunderstood the actual issue. Tested and it is working as intended
1. Created form “test delete”
2. In the consulatation tab , filled observations and did not click on save.
3. Deleted the form from consultation
The deleted form’s observations are not saved.

Only the “history and examination “ form which was not filled and not deleted can be seen and form name “Test delete” is not saved

Angshuman Sarkar September 21, 2021 at 12:43 PM

if you mean, you published another version of the form, without reloading the consultation page?

If so, then I think its highly unlikely while technically maybe achievable. As

  1. Forms are defined in advance by users with admin rights.

  2. Usually changes would not happen in adhoc manner at all. Some planning for deployment is expected, and. not at operational hours.

  3. Data captured through forms are tied to a specific version. For example, you can view and edit a form only specific to the version of the Form. Just that form now onwards the 2nd version superseeds the first.

 

If you agree, can you reverify the issue?

Abhinab Bharali April 20, 2021 at 7:43 AM
Edited

Issue still persist..

  1. created form with observations and published

  2. Recorded the observation in the consultation page but did not save

  3. Changed the observations in the form and published the newer version

  4. Saved the previous observations recorded in the consultation page

  5. Ideally the observations should not be saved as the form has been changed , but the observations and saved and reflected on the dashboard.

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Labels

Components

Fix versions

Priority

Created April 2, 2020 at 11:30 AM
Updated September 23, 2021 at 1:23 PM
Resolved September 23, 2021 at 1:23 PM