Community
Participate
Working Groups
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.
*** Bug 218442 has been marked as a duplicate of this bug. ***
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?
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.
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.
Created attachment 147998 [details] mylyn context
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?
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?
Please attach a patch that has the core changes only. I would like to discuss the UI on bug 290812.
Created attachment 148397 [details] jira_comment_visibility_core core patch attached
One comment. To get this work repository needs to by synchronized and then all cached tasks need to be synchronized.
Good stuff! I have applied the patch.
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)
Fixed.
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)
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)
When is this feature going to be released? I can't find it in the actual IDE Connector
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.
(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
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.