Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Looking for guidance how to script the removal of all requests participants from the JSD ticket

We ran into a need to have to remove all request participants from the JSD ticket generated by email request handler. Essentially we do not need the CC'ed parties to be on the request, but I don't think it is configurable to avoid the addition, so we need to remove them post-creation in the ScriptRunner postfunction. Any help or direction is appreciated.

2 answers

A script like this placed within a post-function will delete all of the names in the Request Participants field and just set it to an empty list.

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.ModifiedValue
import com.atlassian.jira.issue.util.DefaultIssueChangeHolder

def customFieldManager = ComponentAccessor.getCustomFieldManager()
def requestField = customFieldManager.getCustomFieldObjects(issue).find { == "Request participants"}
def changeHolder = new DefaultIssueChangeHolder()
requestField.updateValue(null, issue, new ModifiedValue(issue.getCustomFieldValue(requestField), []),changeHolder)

You could use this in a post-function on the create issue step.

Thanks @Joshua Yamdogo _ Adaptavist, just tested, it worked in the console, but it doesn't seem to work in the create post-function.

Hi Dimitry, 

Were you able to figure out the problem yet? If you have not, I would suggest making sure that your post-functions are in the correct order on the Create transition. Your post-function should be the last item for execution:

Screen Shot 2017-09-05 at 10.23.46 AM.png

Like Yves Martin likes this

Depending on how you set things up, you can tackle this 2 ways i know of. 

1. Have the exchange/email server remove CC and BCC users.

2. Using an addon like JWME you can have the systems workflow remove or add values to any field. 

Thanks. What I find hard to understand is that I know I can script addition of new request participants. How come I can not script removal of said paricipants?

With the JWME it was super easy to add a post function to the ticket creation to strip request participants and other things.

We use the Cloud version of Jira so we dont utilize Scriptrunner. I know I see those Adaptivist gents in the forumns all the time helping folks with scripts....i would try raising a ticket with them for help. 

@JamieA can you please help?

See other comment

Suggest an answer

Log in or Sign up to answer
Community showcase

The benefits of using Jira in different departments

Jira is a great tool to use across different departments. Forget that paperwork – switch to Jira and get that tasks done smoothly. Marketing Jira allows for a complete digital transformation of you...

97 views 0 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you