Script Post-Function has No such property error

I used to get this code worked but now it breaks

and have error message like this:

2014-09-04 17:07:35,846 http-bio-8080-exec-24 ERROR QA1 1027x947457x2 i3kw56 /secure/QuickCreateIssue.jspa [groovy.canned.utils.ConditionUtils] javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: value for class: com.atlassian.jira.user.DelegatingApplicationUser

Possible solutions: name

for the condition:
cfValues['Solution Provider(SBM)']?.value != null

for the addtional code:
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.ComponentManager;
import org.apache.log4j.Category
import com.atlassian.jira.issue.MutableIssue
 * The template script for setting the assignee from a custom user picker
 * Make sure the user chosen is assignable.

def Category log = Category.getInstance("com.onresolve.jira.groovy.PostFunction");
def issueManager = ComponentAccessor.getIssueManager();
ComponentManager componentManager = ComponentManager.getInstance();
def customFieldManager = componentManager.getCustomFieldManager();
def cf = customFieldManager.getCustomFieldObjectByName("Solution Provider(SBM)");
if (cf == null) {
    log.error("No custom field-Solution ProviderSBM found");

def user = issue.getCustomFieldValue(cf);
if (user != null) {
    def user2 = user.getDirectoryUser();
    log.error("Setting assignee to: " + user2.getName());
    log.error("Issue type : " + issue.getClass().getName());

1 answer

1 accepted

Seems like Solution Provider (SBM) is a user custom field, whereas you are treating it like a select list. Maybe someone changed the type?

To check it's not null you should just do:

cfValues['Solution Provider(SBM)']

hi, Jamie, Thank you for reviewing. I find the RC. I use the transition in the script post function which did not have 'only assignee condition' before. And I have the condition so the script post function transition failed.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,725 views 17 21
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you