Community
Participate
Working Groups
Some connectors support deleting/removing comments and attachments. AbstractRepositoryTaskEditor should optionally support delete/remove for comments and attachments maybe with Delete button next to each attachment or comment. Currently this has to be solved by adding custom attribute for deleting attachment or comment.
Lubos: are you interested in contributing this? We don't have a driver because we don't internally support a repository that has this feature.
Mik, jira does allow deleting attachments. Though I am not sure if it is exposed in the API...
I would be glad to contribute it. What timeframe? 2.0M1 or 2.0M2 or ...?
Lubos: since you're volunteering to take this one on, the time frame is up to you. We try to integrate contributors' patches as quickly as we can. What you should do to start is overview how you want to implement it and try to keep the API changes minimal. We'll comment, and then you can go ahead and create a patch.
Lubos: are you considering doing this? If not let me know and I'll reassign it to mylar-inbox.
I will do that. I am waiting for M5 Eclipse/Mylar to start going.
Great. The last dev build we did does support M5, so you can move to that. But we'll be releasing an updated M5 dev build today.
Lubos: if you are still planning on doing this just let us know. Lowering priority for now.
I will start working on it. I will wait for M6 and stable Mylar M6 based build before starting work on it. Should be end of this week, right?
Great. Yes, M6 is this week and Mylar dev builds already support it. However, you would be best off to wait until we release Mylar 2.0M2 next Friday since there might be some API changes coming up.
Created attachment 63421 [details] Patch for deleting attachments and comments
Created attachment 63422 [details] Image of delete attachment, comment controls
Created attachment 63424 [details] Delete comment icon
I have added patch (need delete comment image if accepted) for deleting attachments and comments. UI controls can be seen in attached image. Four protected methods has been introduced. By default they do not support delete comment and/or attachment (no changes in the existing code are needed). If connector supports delete comments and/or attachment it needs to override (and implement) those methods: protected boolean supportsAttachmentDelete(); protected void deleteAttachment(RepositoryAttachment attachment); protected boolean supportsCommentDelete(); protected void deleteComment(TaskComment comment); Attached Delete comment button icon should be placed in org.eclipse.mylar.tasks.ui\icons\elcl16\comment_delete.png. Could one of the committers please review the patch. Thanks.
Rob: please review.
Rob, I think there should be a call in "select" callbacks that delete an attachment or comment to force refresh the task after the delete. What is the call to refresh the task?
New task data will be retrieved by calling: TasksUiPlugin.getSynchronizationManager().synchronize(connector, modifiedTask, true,.... ...Adding a job listener to call AbstractRepositoryTaskEditor.refreshEditor(), which will refresh the editor contents with the recently synched task data (an example can be found in AbstractRepositoryTaskEditor.submitToRepository()). Let me know if you are considering submitting an updated patch.
Created attachment 63795 [details] New patch for deleting attachments and comments
Rob, attached is new version of patch that handles the task synchronization after attachment or comment delete. Attached Delete comment button icon should be placed in org.eclipse.mylar.tasks.ui\icons\elcl16\comment_delete.png. (Patch doesn't handle binary files). If you are OK with implementation, would you please commit the patch and let me know, so I can check it out and validate. Thanks, Lubos
Patch applied (missed the dev build, but we can cut one for you next week). Used standard 'remove' icon for the remove comment link. Moved button next to reply link.
Lubos: A new dev build is available for you to test against: http://download.eclipse.org/technology/mylar/update-site/dev/e3.3/
Rob, you are the man! Tested and validated. Looks great. I am marking the bug as fixed.