Comments
-
Greg Hurrell
So where would be the right place to handle this? There are three places where we can change "metadata" on an issue (not really "metadata" but just attributes):
- Using the issues#edit form.
- Using AJAX in-place editors in issues#show.
-
Programmatically (eg. from the
script/console
).
If we decide that we only want to annotate edits done from a web browser then the right place to do it would be in the issues controller. If we decide we ant to annotate all edits, including programmatic ones, then the right place would be in the issues model itself.
At this stage I really don't know what level would be appropriate, although I am leaning towards the first two levels only (1 and 2).
Regardless of the decision I make, need to decide who will "own" these comments. If they have no owner they will appear as coming from "anonymous", which is probably not what I want. Ideally they would be tagged as coming from "system"; perhaps they would have an entirely different appearance. Perhaps they shouldn't even be comments at all, but a new model called "annotations"; which would be another database query, and I'd have to decide whether they would be displayed interleaved with the comments or separately (as they are in Bugzilla, I think).
-
Greg Hurrell
For an example of what Bugzilla does, go to this bug and click the "history" link next to the "Modified" header.
-
Greg Hurrell
For comparison, take a look at this Trac ticket. You can see how changes appear as comments, owned by the person who made the change.
-
Greg Hurrell
Ok, I think I'm going to do this like Trac does, and I'm going to do it at the controller level, because only the controller knows who is doing the edit. The model can't and shouldn't know that.
-
Greg Hurrell
Ok, looks like I've got it all implemented. But the changes are relatively complicated so will subject them to a bit of testing before deploying.
-
Greg Hurrell
Ok, so I've been testing this for a while in the staging environment and it seems to work well. It's now live on the production server as well.
-
Greg Hurrell
Status changed:
- From: Open
- To: Closed
Add a comment
Comments are now closed for this issue.