SORMAS-Foundation / SORMAS-Project

SORMAS (Surveillance, Outbreak Response Management and Analysis System) is an early warning and management system to fight the spread of infectious diseases.
https://sormas.org
GNU General Public License v3.0
292 stars 140 forks source link

Inform users when they try to de-archive tasks associated with archived entities #10265

Open AliciaRaber opened 2 years ago

AliciaRaber commented 2 years ago

Bug Description

Archived tasks should be set in a different state in the bulk edit mode. It is not possible to perform this operation. Each case has to be De-archive an then the task disappers from the archieved task list in task management view.

Tasks associated with archived entities can't be de-archived. When de-archiving tasks via bulk actions, there is no message informing the user about this fact; instead, there's a success message shown that all tasks have been de-archived, even though those associated with archived entities will remain in the list of archived tasks.

Steps to Reproduce

  1. Go to tasks --> Task management page opens
  2. Click on dropdown field 'active tasks' and choose 'archieved tasks' --> View change to archieved tasks
  3. Click on button 'Enter bulk edit mode' --> Bulk edit mode is active
  4. Choose one ore more tasks by checking the box on the left side of the task
  5. Click on button 'bulk actions'
  6. Select De-archive
  7. A message appears --> Task de-archieved
  8. Refresh page
  9. Choosed task is still in list

Expected Behavior

Tasks should be editable and set in a different state even if case is archieved.

When at least one task among those marked for de-archiving in bulk edit mode is associated with an archived entity, change the success message of the bulk-de-archiving to: "All selected tasks not associated with archived entries have been de-archived. Some tasks could not be de-archived because they belong to archived entries."

Also, make sure that the message has a minimum time of 3 seconds for which it's displayed because otherwise it will immediately go away when the user moves their mouse quickly enough.

Screenshots

Giv attached

System Details

Additional Information

Tasks Bulk Edit

MateStrysewske commented 2 years ago

I suspect this might be due to the "EDIT_ARCHIVED_ENTITIES" feature configuration being disabled. @AliciaRaber Can you please verify that this configuration is indeed disabled on the system that you've tested this on? If that's the case, I believe the solution would be to ensure that the "Edit" bulk action is greyed out.

AliciaRaber commented 2 years ago

Dear @MateStrysewske Thank you for your reply. I got the confirmation that the EDIT_ARCHIVED_ENTITIES is active on the instance I've performed the test.

MateStrysewske commented 1 year ago

@AliciaRaber Checked it on my system, the tasks that you tried to archive are probably tasks of archived cases. Those can't be de-archived (because the case itself is already archived). I'll turn this issue into a change request in order to change the success message when some of the tasks that are chosen for de-archiving can't be de-archived so that the user knows about this.