SORMAS-Project
SORMAS-Project copied to clipboard
Event participants created for archived events are active but listed in the 'Archived event participants' list
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
- In the DB, set the feature configuration EDIT_ARCHIVED_ENTITIES to 'true';
- In the web-app, create an event and archive it;
- Navigate to the 'Event participants' tab and create a new event participant;
- 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:
-
Is it desired that event participants created for events that are already archived should also be directly archived when they are created?
-
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:
The event participant:
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 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.
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
Created a new branch and a different pull request since previous one contains unwanted commits. #10498
Verified ticket on the local machine using the latest version of SORMAS from the development branch - 1.76.0-SNAPSHOT(18b7aeb).