Bulk Edit Request Participant

If you came here through a direct link, you may want to check the main https://jaus.atlassian.net/wiki/spaces/JAUS page first!

Bulk Edit Request Participant is a Userscript that allow Admins to add and remove a Request Participant to issues from a JQL search.

How the Userscript looks in Violentmonkey once installed.

Download/installation URL:

https://bitbucket.org/jira-admin-userscripts/jaus/raw/master/src/jaus-bulk-edit-request-participant.user.js

Use cases

This Userscript was meant for Admins to bulk add or remove Request Participants from issues (if Jira Service Management is installed).

This is particularly interesting if you have a public-facing Jira Service Management instance and users leave their respective organizations. If this info reaches you, it’d be interesting to remove such user from all the tickets they’re a participant (so they don’t keep access to the issues data like comments and attachments).

Assignee, Reporter and Watcher are fields that we’re able to bulk edit. In a complete use-case you’d want to edit those fields too apart from the Request Participants.

Scope

The Userscript works on the “issues/?jql=” search screen:

Issue search page with the JAUS “Bulk Edit RP” button and the screen it injects once activated.

Usage

Press the JAUS button on the top or the access key “u” so the Bulk Edit Request Participant box shows up.

For Server/DC you must provide the Request Participant’s username. For Cloud, it's the accountId.

The Userscript searches for the provided user as soon as the field’s blurred (you click or “tab” out of it). If the user’s found, it renders a green tick next to it or a warning icon otherwise.

Once you press in “Update issues!” the Userscript will fire a request for each issue, wait 5 seconds then reload the page. It’s nice if you select the “Request Participant” column to show in the search results so you can see the changes right then.

Notice only 50 issues get updated at a time, so you may need to run it a few times.

If you plan on replacing a Request Participant for another, it’s best if you first add the new participant then remove the old one. This makes is easier as the JQL you may use could look like the one below and you wouldn’t loose the results after the current participant’s removed:

"Request participants" = "current-username-or-accountId"

Also keep in mind all JAUS Userscripts are MVPs. This means the main focus is on the basic functionality. You may expect some visual glitches if going-back-and-forth, resizing the screen or switching from field to field too quickly, etc. Also the error feedback is very basic to non-existent: some errors just prevent the execution going forward and not show a message.

Mechanics

The Userscript makes use of the following REST API endpoints:

GET rest/api/2/user

GET rest/api/2/search

POST rest/servicedeskapi/request/<issue-key>/participant

DELETE rest/servicedeskapi/request/<issue-key>/participant

  1. It first searches for the user once the field’s blurred.

  2. Then it searches the issues with the provided JQL.

  3. For each issue returned, it fires a request to add (POST) or remove (DELETE) the user from the Request Participant field.

  4. After some 5 seconds, the whole page is reloaded. You may search for those issues to confirm if the operation was successful.

Repository

JAUS Bulk Edit Request Participant’s source code is hosted in BitBucket:

https://bitbucket.org/jira-admin-userscripts/jaus/src/master/src/jaus-bulk-edit-request-participant.user.js

Notice that to download/install we advise the /raw/ URL.

Authorship

JAUS Bulk Edit Request Participant was designed and implemented by Rodrigo Martinez (Linkedin profile).

It's licensed under Creative Commons Attribution-ShareAlike 4.0 International License.

Support

If you have questions, any problem or need instructions on this Userscript’s usage, please open a request in the JAUS Help Portal.

Please select the Component jaus-bulk-edit-request-participant.

Roadmap

Known issues

Please submit them through JAUS Help Portal!

JAUS feature request