Ability to set visibility when writing comments in linked issues (part of JSD projects)

Issue #175 resolved
Aggelos Paraskevopoulos [Cententia]
created an issue

When writing a "new comment" on linked issues that happen to be of Service Desk type project we need a way to select the type ("visibility") of comment. This is actually handled by a comment entity ("CommentProperty") property (propertyKey="sd.public.comment".) Now the default behavior is to add the comment as "public" one, even if the executing user is a collaborator.

<EntityProperty id="10439" entityName="CommentProperty" entityId="10274" propertyKey="sd.public.comment" created="2015-09-21 07:16:26.794" updated="2015-09-21 07:16:26.794" value="{&quot;internal&quot;:&quot;true&quot;}"/>
<EntityProperty id="10440" entityName="sd.comment.property" entityId="10274" propertyKey="sd.public.comment" created="2015-09-21 07:16:26.826" updated="2015-09-21 07:16:26.826" value="{&quot;internal&quot;:true}"/>

Cheers, AP

Comments (24)

  1. Fidel Castro Armario repo owner

    Hi Aggelos,

    I have made available version 2.2_beta_20 which supports setting visibility for JSD comments.

    You have two different ways to do it:

    1. Once created a comment (e.g., using "New comment" virtual field), you can use virtual field "Last comment's visibility restriction" for setting visibility restriction. You should write on this field value "internal" or "public" (without double quotes) for setting JSD (Jira Service Desk) comment's visibility.

    2. A more direct way to do it is simply by adding string ": {visibility=internal}" or ": {visibility=public}" at the end of your comment's body when creating a comment with "New comment" or when editing a comment with "Last comment".

    This is an example of the second option:

    conf-0.png

    And here is the resulting comment:

    result.png

    You can also use the name of a group or the name of a project role as value of optional parameter visibility (i.e., ": {visibility=jira-developers}" or ": {visibility=Managers}"), and the visibility will be set for entered group or project role.

  2. Stefan Bittner

    Hi Fidel,

    what should I do if I want to copy the comment from the actual issue from Field "Transition's comment - [Text]" to the linked issue into the field "New comment - [Text]? How can I add the visibility to the role "Users"?

    Cheers Stefan

  3. Fidel Castro Armario repo owner

    Assuming that your condition is on comment entered in the transition, you can use boolean expressions like these:

    1) A comment has been entered in transition, and the visibility is Internal.

    %{00127} != null AND %{00130} = "Internal"
    

    2) A comment has been entered in transition, and the visibility is not Internal.

    %{00127} != null AND %{00130} != "Internal"
    

    3) A comment has been entered in transition, and the visibility is public.

    %{00127} != null AND %{00130} = ""
    

    Note that %{00127} is field code for Transition's comment, and %{00130} is field code for Last comment's visibility restriction.

  4. Stefan Bittner

    Hi Fidel, if you look above, you were able to help me with the problem of the visibility of a Transition comment. Your solution does completely what I need and it works great: 2017-12-13 21_15_50-Microsoft Edge.png

    Unfortunately and more by luck I found out, that this post function will always write a comment to the linked issue. If there was a comment in the transition the text of this comment will be written in a new comment in the linked issue = Correct! But if there is no transition comment, a new but empty comment will be written which makes no sense and will confuse the users = Incorrect. 2017-12-13 21_26_16-Microsoft Edge.png

    Is there a chance only to write a comment to the linked issue if there is a transition comment?

    Cheers Stefan

  5. Log in to comment