Open adinaflorea9 opened 1 year ago
I would guess that this is caused by the simultaneous change of disease and classification at the same time; because this can lead to the system classification (i.e. the automatically calculated classification) changing, and that then leads to the case classification being re-calculated after the case is saved. You can test this out by attempting to do the same bulk change that you just did, but with the automatic case classification feature turned off (you have to edit the sormas.properties file for that and restart the server). If my assumption is correct, all cases should be updated as expected then.
@MateStrysewske @sergiupacurariu I tried Mate's suggestion from the comment above and the 'Case classification' is updated accordingly for all the cases that I selected in bulk edit mode if the automatic case classification is turned off.
A solution could be to skip the automatic classification when the user has edited the case classification; this is easy to figure out because we have a boolean parameter that tells us whether the user has updated the case classification or not. However, I think this should involve some refactoring because I'd like to not just add another parameter to the save methods; we should rather introduce a new class, e.g. called "CaseSaveParameters", that contains information such as this one and the already existing syncShares parameter.
Since I don't think it's likely that people will bulk-edit the disease and classification of cases at the same time, I don't think it's important to do this right now.
Problem Description
When editing cases through bulk edit mode, the case classification of the selected cases is not updated for all of them. The issue seems to be reproducible randomly and I could not yet have a very clear set of steps under which this can be reproduced every time. It seems that once the cases are edited through bulk edit mode, then the update is done for all of them ne second time.
I could reproduce this on my local machine and also on @sergiupacurariu 's local machine.
Reproduction Steps
Actual behavior: the disease, outcome of case, investigation status and facility have been updated for all of the cases; the case classification has not been updated for part of them (for me out of 200 cases selected for 50 the case classification was not updated).
Expected Behavior
The 'Case classification' should be updated for all of the selected cases.
Affected Area(s)
Web app
SORMAS Version
1.84.0
Android version/Browser
Chrome
User Role(s)
Admin+NatUser
Server URL
local machine
Additional Information
No response