hudmol/archivesspace — pull request #326 by lcdhoffman (2013-03-10 20:23:25+00:00)
Title: Recording Events when Agents are created

For review.

This is an attempt to deal with:
https://www.pivotaltracker.com/projects/386247#!/stories/45553651

It causes an Event to be created whenever an Agent is cataloged. This Event is used to populate the "Maintenance History" of an EAC stream derived from an Agent record.

There are a few issues:

1. Agents are global but Events are scoped to a repository. In this branch, the events are being added to the 'global' repository (1), which means they are invisible through the UI. This seems like part of a larger issue that needs to get resolved at some point. There doesn't seem to be an easy way to tie the events to the visible repositories: what if a user in repo B wants to export an Agent record that was created in the context of repo A?

2. Users are now acting like "linked agents", but without conforming to some of the basic agent properties. Should users just be agents? Or should each user record be linked to 1 agent record? As it is now, there are some workarounds to prevent users from showing up in the /agents list, etc.

3. The roles and event types in the ASpace model don't line up well with the event types and roles called for in EAC. There are some weird mappings in the EAC serializer such as "cataloging" --> "created".