GSoC 2015: Coding Period
Tuesday, July 14, 2015Passed my mid term evaluations :) Thanks to my mentors for all their support and guidance. I've been working on implementing threaded...
Tuesday, July 14, 2015
Passed my mid term evaluations :) Thanks to my mentors for all their support and guidance.
I've been working on implementing threaded comments in ticket modify view. Earlier the comments were created by creating message markups of all the comments and then concatenating them in the content part of the ticket item. In this way, editing/reply to comments was not possible.
New implementation:
Each comment is a new item which refers to the itemid of the ticket in which it is created. In this way, it is easy to query all the comments of a particular ticket.
Initially, I worked on non-threaded comments, then added a feature to reply to comments. It is similar to non-threaded comments but the difference is, there is a new field "reply_to" which stores the itemid of the comment to which a reply is made which is hence, stored in the "refers_to" field of the comment reply. After this, I tried to create a tree of all the comments in a ticket which included comments, replies of comments, replies of replies and so on.
Something like :
[[<MoinMoin.storage.middleware.protecting.ProtectedRevision object at 0x7f907596d550>, [<MoinMoin.storage.middleware.protecting.ProtectedRevision object at 0x7f9075963d50>, []]]]
The list above, is the tree of 1 single comment which has 1 reply and 1 reply to reply.
Still more work has to be done to render the comments in threaded form in the UI. Also, there is some issues in the recursive function I wrote for parsing the comments/reply tree which I think can be fixed soon.
CR: https://codereview.appspot.com/256840043/
I've been working on implementing threaded comments in ticket modify view. Earlier the comments were created by creating message markups of all the comments and then concatenating them in the content part of the ticket item. In this way, editing/reply to comments was not possible.
New implementation:
Each comment is a new item which refers to the itemid of the ticket in which it is created. In this way, it is easy to query all the comments of a particular ticket.
Initially, I worked on non-threaded comments, then added a feature to reply to comments. It is similar to non-threaded comments but the difference is, there is a new field "reply_to" which stores the itemid of the comment to which a reply is made which is hence, stored in the "refers_to" field of the comment reply. After this, I tried to create a tree of all the comments in a ticket which included comments, replies of comments, replies of replies and so on.
Something like :
[[<MoinMoin.storage.middleware.protecting.ProtectedRevision object at 0x7f907596d550>, [<MoinMoin.storage.middleware.protecting.ProtectedRevision object at 0x7f9075963d50>, []]]]
The list above, is the tree of 1 single comment which has 1 reply and 1 reply to reply.
Still more work has to be done to render the comments in threaded form in the UI. Also, there is some issues in the recursive function I wrote for parsing the comments/reply tree which I think can be fixed soon.
CR: https://codereview.appspot.com/256840043/