Bug 211654 - support setting the visibility of comments
Summary: support setting the visibility of comments
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: 3.3   Edit
Assignee: Jacek Jaroczynski CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed, noteworthy
: 218442 (view as bug list)
Depends on:
Blocks: 215109 290812
  Show dependency tree
 
Reported: 2007-11-30 17:29 EST by Steffen Pingel CLA
Modified: 2011-03-30 01:58 EDT (History)
4 users (show)

See Also:


Attachments
patch (29.99 KB, patch)
2009-09-24 08:23 EDT, Jacek Jaroczynski CLA
no flags Details | Diff
mylyn context (1.36 MB, application/zip)
2009-09-24 08:27 EDT, Jacek Jaroczynski CLA
no flags Details
jira comment visibility (28.89 KB, patch)
2009-09-29 10:39 EDT, Jacek Jaroczynski CLA
no flags Details | Diff
jira_comment_visibility_core (24.38 KB, patch)
2009-09-30 05:01 EDT, Jacek Jaroczynski CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Steffen Pingel CLA 2007-11-30 17:29:05 EST
JIRA has a feature that allows to setting of the visibility when submitting  a comment to an issue. The JIRA task editor should support that.
Comment 1 Steffen Pingel CLA 2008-02-10 14:33:58 EST
*** Bug 218442 has been marked as a duplicate of this bug. ***
Comment 2 Steffen Pingel CLA 2009-09-17 21:23:32 EDT
Looks like project roles can be retrieved through JiraSoapService.getProjectRoles(). Not sure if that call requires administrative privileges. 

Jacek, are you interested in working on this?
Comment 3 Jacek Jaroczynski CLA 2009-09-18 01:44:51 EDT
Yes, I am. I actually started investigation and managed to add comment with restricted visibility using Soap 'addComent' call. I will post proposed solution for review. Thanks.
Comment 4 Jacek Jaroczynski CLA 2009-09-24 08:23:44 EDT
Created attachment 147996 [details]
patch

patch attached.

How it works:

* It displays 'Viewable By" combo box below the new comment window in exactly the same way as JIRA does.
* The combo contains only roles (there is no way to retrieve groups from JIRA).
* The combo contains all roles (there is no way to filter the list by project and user - available soap call requires administrative privileges). When user tries to add comment visible to the role he is not a member then Mylyn displays standard error in the editor.
Comment 5 Jacek Jaroczynski CLA 2009-09-24 08:27:28 EDT
Created attachment 147998 [details]
mylyn context
Comment 6 Steffen Pingel CLA 2009-09-24 20:32:22 EDT
The patch looks good. To simplify reviewing could only include the changes to the core for now and remove all commented out code from the patch?
Comment 7 Jacek Jaroczynski CLA 2009-09-29 10:39:10 EDT
Created attachment 148333 [details]
jira comment visibility

- commented code has been removed
- patch adjusted to the latest trunk changes

Beside of jira.core there are only minor changes to the jira.ui.editors and tasks.ui.editors. Do you want me to create patch without jira.core changes?
Comment 8 Steffen Pingel CLA 2009-09-29 11:04:05 EDT
Please attach a patch that has the core changes only. I would like to discuss the UI on bug 290812.
Comment 9 Jacek Jaroczynski CLA 2009-09-30 05:01:55 EDT
Created attachment 148397 [details]
jira_comment_visibility_core

core patch attached
Comment 10 Jacek Jaroczynski CLA 2009-09-30 08:03:36 EDT
One comment. To get this work repository needs to by synchronized and then all cached tasks need to be synchronized.
Comment 11 Steffen Pingel CLA 2009-09-30 15:35:57 EDT
Good stuff! I have applied the patch.
Comment 12 Steffen Pingel CLA 2009-10-01 16:17:14 EDT
Need to address an NPE if configuration has not been updated:

java.lang.NullPointerException
at org.eclipse.mylyn.internal.jira.core.JiraTaskDataHandler.initializeTaskData(JiraTaskDataHandler.java:286)
at org.eclipse.mylyn.internal.jira.core.JiraTaskDataHandler.createTaskData(JiraTaskDataHandler.java:173)
at org.eclipse.mylyn.internal.jira.core.JiraRepositoryConnector$QueryHitCollector.collectIssue(JiraRepositoryConnector.java:580)
Comment 13 Steffen Pingel CLA 2009-10-01 16:27:10 EDT
Fixed.
Comment 14 Steffen Pingel CLA 2009-10-02 00:28:24 EDT
Another NPE:

java.lang.NullPointerException
at org.eclipse.mylyn.internal.jira.core.JiraTaskDataHandler.postTaskData(JiraTaskDataHandler.java:1002)
at org.eclipse.mylyn.internal.tasks.core.sync.SubmitTaskJob.run(SubmitTaskJob.java:79)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Comment 15 Steffen Pingel CLA 2009-10-09 18:55:43 EDT
java.io.NotSerializableException: org.eclipse.mylyn.internal.jira.core.model.ProjectRole
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at org.eclipse.mylyn.internal.jira.core.JiraClientManager.stop(JiraClientManager.java:119)
at org.eclipse.mylyn.internal.jira.core.JiraCorePlugin.stop(JiraCorePlugin.java:93)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:843)
at java.security.AccessController.doPrivileged(Native Method)
Comment 16 Steffen Pingel CLA 2009-10-09 19:58:02 EDT
Fixed.
Comment 17 Manuel Wortmann CLA 2010-01-18 08:11:58 EST
When is this feature going to be released? I can't find it in the actual IDE Connector
Comment 18 Jacek Jaroczynski CLA 2010-01-18 10:22:27 EST
The UI patch has not been applied yet so this feature is still not visible. We should resume work on that feature soon so stay tuned.
Comment 19 Chris Beams CLA 2011-03-30 01:55:05 EDT
(In reply to comment #18)
> The UI patch has not been applied yet so this feature is still not visible. We
> should resume work on that feature soon so stay tuned.

It's now more than a year later, and I still don't see this in the (latest) Mylyn UI.  Did this become the domain of the Atlassian PLE connector?  In any case RESOLVED FIXED is a bit misleading.

See also my comments on 212960 and the issue I've added on the Atlassian side (https://studio.atlassian.com/browse/PLE-1301)

Thanks,

- Chris
Comment 20 Jacek Jaroczynski CLA 2011-03-30 01:58:06 EDT
It has been fixed and the change was visible in the UI. Unfortunately the Project Owner decided to remove the feature as it was only partially implemented due to the JIRA API limitations. Please see my comment at https://studio.atlassian.com/browse/PLE-1301.