reciprocity/ggrc-core — pull request #1271 by Smotko (2014-04-22 15:34:46+00:00)
Title: Show context for access mappings in event log

Story: https://www.pivotaltracker.com/story/show/59720008

@danring for some reason context_id is not set in revision.content when a new UserRole is created. I've tracked the issue down to common.py:269 where log_json has an empty context_id even though context_id in the UserRole was properly set.

Because neither Revision nor Event have any reference to the context_id there is no way to find out which program was affected by the UserRole once the UserRole is deleted (this happens when the permission changes).

I couldn't find figure out why log_json doesn't have the context_id, but a workaround that I found was to store the context_id in teh Event. Is there a reason this wasn't being done yet?