Open grantfitzsimmons opened 1 year ago
After merging 2 agents, changes to the remaining agent's fields are displayed as updates in the audit log. Not sure if it's a bug, but changes to the GUID field don't seem to appear in the audit log.
To-be-merged agents:
Merged record: https://coldfish-agent-merging.test.specifysystems.org/specify/view/agent/73/
Audit log of remaining agent after merge (last three rows are from a previous merge):
Audit log of determinations (no determiner records in this database) associated with merged agent is empty and are now associated with the agentid of the first agent:
Likewise with accession agent record:
And with collector records (Applies to collector records associated with either of the records before merging):
Merging agents with addresses:
Merged record: https://coldfish-agent-merging.test.specifysystems.org/specify/view/agent/20735/
Audit log (does not seem to register updates to address; also tried merging the addresses themselves as well):
Anything you would like to see or want me to clarify?
Looks like back end does not allow front-end to update GUIDs, which is why it is not in the audit log:
@grantfitzsimmons should we add a way for front-end to update guid so that people can merge it? or should we just hide it from the agent merging screen?
Agent GUIDs are not crucial at the moment, but GUIDs for other tables can be more important (i.e, Collection Object once merging tool can support them)
@acwhite211 can you add a new audit log action type that denotes a record merge and create an entry with that type when doing the merge?
@grantfitzsimmons should we add a way for front-end to update guid so that people can merge it? or should we just hide it from the agent merging screen?
At the moment I have never heard of someone using the GUID field for Agents, but in the future merging localities, taxon records, etc. it will be essential to support updating GUIDs on the front-end as you said. We can hide GUID for this release and expand it in the future?
@acwhite211 can you please look into fixing this before initial agent merging release?
It should be a simple feature to add. And it would allow showing a stat on the stats page of how many records were merged (by running a count query on the audit log)
Can someone test a few things related to this? When merging 2 agents, what does audit log look like for them (remember, one record is deleted, another edited) What does the audit log for the tables that used the old agent look like (i.e, Collector, Determiner, Accession Agent, Loan Agent)?
Based on what we see, we should consider adding a new type of entry to the audit log - a record merge action (in addition to the tree merge we already have in there)