Request Participants using Copy a parsed text to a field

Issue #574 resolved
Katelyn Schuh created an issue

Hi,

I am trying to add a group as participants to a ticket using your plugin. I have read through issue #520 (https://bitbucket.org/fcarmario/jira-workflow-toolbox/issues/520/adding-participants-from-group) and have tried to make this work for the last few days. Can you please break this down a bit more?

I have chose the "Copy a parsed text to a field" post function in my workflow. "Request Participants" field in the Target field.

The text I am using is: ""+ " + toString(usersInGroup(%{mrtech})" Am I missing another piece of this configuration? I am only seeing individual users populate under the "Request participants:" field. The group I'd like to test this with is called mrtech.

My Post function summary reads as this: The following text parsed in advanced mode will be copied to Request participants: ""+ " + toString(usersInGroup(%{mrtech})" This feature will be run as user in field Current user.

I am also attaching a screenshot of what my post function configuration looks like. Please let me know if you need anymore information. Thank you!

Comments (11)

  1. Fidel Castro Armario repo owner

    Hi Katelyn,

    You should "Copy a parsed text to a field" post-function use any of the following 2 equivalent configurations:

    1) Using directly the name of the group with operator +:

    • Target field: Request participants
    • Parsing mode: basic
    • Text to be parsed...: + mrtech

    2) Obtaining a comma separated list with usernames of members of group 'mrtech':

    • Target field: Request participants
    • Parsing mode: advanced
    • Text to be parsed...: "+ " + toString(usersInGroup("mrtech"))
  2. Katelyn Schuh reporter

    Hi Fidel,

    Thank you for getting back to me so quickly! I was able to populate the group list with each of these options.

    Is there anyway to have the group name (in this case mrtech) appear under "Request participants:" instead of each individual members name of the group? Some groups we have will include over 100 individuals!

    I was able to see the notification scheme go back and forth between members of this group. As far as notifications go, Is there anyway to automatically exclude notifications for the added "Requested Participants" group members? I saw the initial email that gets send out gives the option to turn off the notifications, but some individuals will be getting email after email because they are a part of so many different groups.

    Our main focus for this is giving groups of people the access and ability to see/comment on these tickets, not necessarily to follow each comment and status update.

    Thank you! Katelyn

  3. Fidel Castro Armario repo owner

    Hi Katelyn,

    Sorry, but "Request participants" can contain a list of users, but not groups or project roles. It's a limitation of the field, not of JIRA Workflow toolbox.

    In relation with your question about notifications: Atlassian's documentation says:

    "Participants receive the same notifications as the reporter, and can turn off notifications at any time."

    If you don't want your participants to receive notifications due to other groups, the only solutions is to remove them from those other groups. Maybe you can reorganize your notification schemes, avoiding unnecessary redundancy.

  4. Katelyn Schuh reporter

    Hi Fidel,

    Thanks for all your help on this. Is there any other option within Workflow Toolbox, other than "Copy a parsed text to a field" and inserting the code, that would get us to our goal of adding groups of users to particular tickets?

    Thank you.

  5. Fidel Castro Armario repo owner

    You can use "Write field on linked issues or subtasks" and "Write field on issues returned by JQL Query or Issue List" post-functions for adding groups to linked issues, subtasks, sibling subtasks, JQL selected issues, or issues selected using an issue list expression.

    You should use in both post-functions the following source value configuration:

    • Source type: parsed text (basic mode)
    • Source value: + mrtech

    Assuming that you want to add users in group mrtech.

  6. Katelyn Schuh reporter

    Hi Fidel,

    I am getting the following error when trying to add the “Write field on issues returned by JQL Query or Issue List" option to my post function:

    Text parsed in basic mode + mrtech will be copied to field Watchers in every issue returned by the following Issue List expression: >>> PARSE ERROR: Encountered "<EOF>" at line 0, column 0. Was expecting one of: "(" ... "issuesFromJQL" ... "linkedIssues" ... "transitionLinkedIssues" ... "transitivelyLinkedIssues" ... "subtasks" ... "siblingSubtasks" ... "filterByProject" ... "filterByProjectCategory" ... "filterByStatus" ... "filterByStatusCategory" ... "filterByIssueType" ... "filterByResolution" ... "filterByFieldValue" ... "getIssuesFromProjects" ... "issueKeysToIssueList" ... "union" ... "except" ... "intersect" ... "append" ... "distinct" ... "filterByCardinality" ... "filterByPredicate" ... "first" ... "last" ... "nthElement" ... "sublist" ... "sort" ... "(" ... "(" ... "first" ... "last" ... "nthElement" ... "(" ... "first" ... "last" ... "nthElement" ... "(" ... "first" ... "last" ... "nthElement" ... "(" ... "a...

    Please advise. Thank you!

  7. Fidel Castro Armario repo owner

    Hi Katelyn,

    You should add a JQL query or an Issue list expression in order to select the issues whose Watchers field you want to write.

    The error you are getting is due to the fact that have left empty the field where the issue list is expected to be entered.

    Which issues do you want to write into?

  8. Katelyn Schuh reporter

    Hi Fidel,

    I have adding in a JQL query and was able to yield results. The only problem is – they are the same results as the last attempt ("Copy a parsed text to a field"). I am only seeing the individual names show up under the requested field, rather than the group name. Is there any other options to choose from that would return this result? With the currently configuration a I seeing hundreds of notifications fire off – and this is only with one small group of people added. Please advise.

  9. Fidel Castro Armario repo owner

    Sorry Katelyn, but "Request participants" can only contain users, not groups.

    If you want to send a notification to members of the group only at a particular transition of youe workflow, you can use "Send an email" post-function instead of turning them participants of the issue.

  10. Log in to comment