SORMAS-Project icon indicating copy to clipboard operation
SORMAS-Project copied to clipboard

Event participants created for archived events are active but listed in the 'Archived event participants' list

Open adinaflorea9 opened this issue 2 years ago • 2 comments

Bug Description

When the feature configuration EDIT_ARCHIVED_ENTITIES is set to 'True', for an archived event, new event participants can be added.

In the UI, these event participants are listed in the 'Archived Event Participants' list of the event. However, they are not archived - the 'Archive' button is visible on the event participant page.

In the DB, in the 'archived' boolean column, the value for these event participants is set to 'false' (i.e. they are active event participants).

Steps to Reproduce

  1. In the DB, set the feature configuration EDIT_ARCHIVED_ENTITIES to 'true';
  2. In the web-app, create an event and archive it;
  3. Navigate to the 'Event participants' tab and create a new event participant;
  4. Observe the new event participant's page in the UI, and it's entry in the DB.

Actual Behavior

The event participant is listed in the 'Archived event participants' list of the event. On the event participant's page the 'Archive' button is still visible and it can be actioned by the user. In the DB, for the event participant's entry, the value from the column 'archived' boolean is set to 'false' (i.e. they are an active event participant).

Expected Behavior

Expected behavior to be discussed:

  1. Is it desired that event participants created for events that are already archived should also be directly archived when they are created?

  2. Is it desired that event participants created for events that are already archived should be active (as the current behavior is) and also listed in the 'Active event participants' list of the event?

Screenshots

The archived event: image

The event participant: image image

System Details

  • Device: Windows 10
  • SORMAS version: 1.75.0-SNAPSHOT(7e4e9eb)
  • Android version/Browser: Chrome
  • Server URL: local machine
  • User Role: Admin+NatUser

Additional Information

@kwa20 perhaps you could please provide some input regarding the expected behavior here?

adinaflorea9 avatar Jul 14 '22 08:07 adinaflorea9

@adinaflorea9 Sorry for the late reply. Since the event is already archived I think that it makes sense for the event participants to be archived upon creation as well. We might be able to assume that adding event participants to an already archived event is being done for data quality reasons so the event participants are not actively being worked on. I guess another option would be to ask the user if they want to de-archive the event when adding a new (active) event participant. This might become pesky though when adding multiple event participants and if they decline there will still be active event participants in archived events.

So let's go with the first option.

kwa20 avatar Sep 15 '22 15:09 kwa20

Decision from discussion: @andrei7bal @sergiupacurariu @MateStrysewske

  • Event participants that are created for events that are already archived will be directly archived when they are created

markusmann-vg avatar Sep 21 '22 07:09 markusmann-vg

Created a new branch and a different pull request since previous one contains unwanted commits. #10498

andrei7bal avatar Sep 30 '22 10:09 andrei7bal

Verified ticket on the local machine using the latest version of SORMAS from the development branch - 1.76.0-SNAPSHOT(18b7aeb).

adinaflorea9 avatar Oct 11 '22 13:10 adinaflorea9