When you edit a Custom Policy, the text in the transaction log is mostly useless.
{F138613, size=full}
It should either display a human readable description or provide a link to view the old and new policy.
Rough plan from epreistley:
- It's probably not hugely difficult. Rough approach:
- Add a controller to the Transactions application, similar to PhabricatorApplicationTransactionCommentHistoryController, PhabricatorApplicationTransactionCommentEditController, and PhabricatorApplicationTransactionDetailController. The idea is that we're going to verify you have permission to see the policy by verifying you have permission to see a transaction which used it, which is why this is part of Transactions instead Policy.
- So the link will end up being something like: /transactions/PHID-XTRN-ABCD-dfaklnsfdlkasn/old/
- Meaning: load that transaction, verify the user can see the transaction and the object it applied to, then show the old policy.
- After loading the transaction, you can pull the old or new PHID as appropriate and then load the actual policy object with PhabricatorPolicyQuery.
- That object has getRuleObjects() and getDefaultAction(), which have the information you need to render a human-readable description, more or less.
- You can use "workflow" on the link and return a dialog.
IRC transcript: https://secure.phabricator.com/chatlog/channel/6/?at=127746