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

Groovy Script Help For Condition for Group Picker Filed in script Listener

Hi Team,

I Have a Group Picker Field (Single picker) here i'm trying that when I created a ticket When that particular group value chages to Group "-Y-" in any status only that particular group has to get notification.

Here I'm performing when an issue is updating in the particular group filed  changes to "-Y-" group only that group required the notification. If that field chages to "-X-" or "-Z-" they dont required notification


Here is the steps i have followed 

> I created a custom event named "Notification" and selected the template "issue update" 

> in notification scheme i have selected that group in that partucular custom event.

> in the " Script Listener " a added a custom Listener and added a script 

import com.atlassian.jira.component.ComponentAccessor

def customFieldManager = ComponentAccessor.customFieldManager

def issue = event.issue
def customField = customFieldManager.getCustomFieldObject(10002 as Long)
log.warn("Custom field: " + customField)
def customFieldValue = issue.getCustomFieldValue(customField)
log.warn("Custom field value: " + customFieldValue)

log.warn("Result: " + customFieldValue == "-Y-")
return customFieldValue == "-Y-"

> in events I selected the Issueupdate and Custom Event I created and target project i seletcted the project that i want

>I updated the ticket I got these errors 

2018-12-19 17:17:06,644 WARN [runner.ScriptRunnerImpl]: Custom field:  Group
2018-12-19 17:17:06,644 WARN [runner.ScriptRunnerImpl]: Custom field value: [com.atlassian.crowd.embedded.impl.ImmutableGroup@bd6c997c]
2018-12-19 17:17:06,644 WARN [runner.ScriptRunnerImpl]: false


Can anybody help me with the script




0 answers

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...

32 views 0 2
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