Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Error in scriptrunner code - getting select list values

I am trying to get the select list value from JIRA and pass on the value to payload.


Custom Field = Impact

Type = Select List

If I give the value directly as Impact = "Medium" and pass the payload , I am getting a 200 status code

but if I try with the below method,

def impact = customFieldManager.getCustomFieldObjectByName("Impact")
def impactV = issue.getCustomFieldValue(impact).toString()"Impact is " + impactV)

am getting the below error,

groovy.lang.MissingMethodException: No signature of method: is applicable for argument types: (String) values: [Medium]
Possible solutions: wait(), any(), wait(long), each(groovy.lang.Closure), tap(groovy.lang.Closure), any(groovy.lang.Closure)

Can someone please help me with this?

1 answer

1 accepted

1 vote
Answer accepted
Ram Kumar Aravindakshan _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Aug 11, 2022 • edited

Hi @Catheline Dass

In your description, you mentioned:-

I am trying to get the select list value from JIRA and pass on the value to payload.

May I know what you are using the pass the value? Is it a Post-Function?

I've done a basic test in my environment using the Post-Function, and I do not seem to be encountering any problems.

From the code that you have shared, I notice a bad approach, i.e.:-

def impact = customFieldManager.getCustomFieldObjectByName("Impact")

This approach has been deprecated.

You should instead invoke your custom field like:-

def impact = customFieldManager.getCustomFieldObjectsByName('Impact').first()

Below is the sample code that I have tested with:-

import com.atlassian.jira.component.ComponentAccessor

def customFieldManager = ComponentAccessor.customFieldManager
def sampleList = customFieldManager.getCustomFieldObjectsByName('Sample List').first()
def sampleListValue = issue.getCustomFieldValue(sampleList) as String

log.warn "=====>>>> Value Selected: ${sampleListValue}"

Below is a screenshot of the test that I have done. I have selected Option 1 from the Sample  List field.


Once the issue transitions, the log output returned is:-

2022-08-11 16:42:26,805+0800 http-nio-9091-exec-16 WARN admin 1002x668x1 1incwoo 0:0:0:0:0:0:0:1 /secure/WorkflowUIDispatcher.jspa [c.o.scriptrunner.runner.ScriptBindingsManager] =====>>>> Value Selected: Option 1

I hope this helps to answer your question. :)

Thank you and Kind regards,


It helped!! Thank You Ram!!!!

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events