IFRCGo / go-api

MIT License
14 stars 6 forks source link

Audit trail is incorrectly saying that I updated fields #2114

Open nanometrenat opened 5 months ago

nanometrenat commented 5 months ago

Issue

https://goadmin-stage.ifrc.org/en/admin/api/fieldreport/15157 - I changed the summary [en] field on this Field Report, did not change any other fields, then clicked Save.

When I subsequently went to look at the audit trail at https://goadmin-stage.ifrc.org/en/admin/api/fieldreport/15157/history/ it correctly reported that I had Changed Summary [en] - but it also incorrectly reported that I had changed ohter fields that hadn't been changed: Description [en] and Actions taken (others) [en] Changed Email for field report contacts

image

Steps to reproduce

Edit a field report in the back end

Expected behaviour

It should only show a change if there is a change

Related feature

https://github.com/IFRCGo/go-api/issues/572

szabozoltan69 commented 5 months ago

Nice catch! My guess is that it is related to the translation system somehow, which tries to give a new translation for defined fields (even if they were not changed). But it should be investigated more deeply.