ScriptRunner - Fast track logic failing in JIRA upgrade to 6.4.7, Scriptrunner 3.0.16

Susan Hauth Community Champion Jul 02, 2015

Upgraded from JIRA 6.1.3 to 6.4.7 and Scriptrunner 2.1.16 to 3.0.16 in our DEV.   The fast-track condition is failing and give us an error in the log:

2015-07-02 18:03:20,363 http-bio-443-exec-1 ERROR shauth 1083x1212x3 162b5os 10.9.30.109 /secure/CreateIssueDetails.jspa [canned.jira.utils.ConditionUtils] Script follows:

cfValues['Quick Close']*.value.contains("Quick Close") && isUserMemberOfRole('Operations')

No other changes made. 

6 answers

1 accepted

This widget could not be displayed.
Susan Hauth Community Champion Jul 06, 2015

Problem Solved!  the Project Role was "Operations  " (2 blanks on the end). Argh.  I edited the role name and voila all is fine again.   Guess 6.1 wasn't as fussy!  MANY THANKS!!!

 

This widget could not be displayed.

The previous line should be an exception - can you post that as well?

This widget could not be displayed.
Susan Hauth Community Champion Jul 02, 2015

2015-07-02 18:03:18,860 http-bio-443-exec-1 WARN shauth 1083x1212x3 162b5os 10.9.30.109 /secure/CreateIssueDetails.jspa [onresolve.scriptrunner.runner.ScriptRunnerImpl] Add a script root for this path: D:\Program Files\Atlassian\JIRA\atlassian-jira\WEB-INF\lib\CalculateDueDate.groovy

2015-07-02 18:03:19,691 http-bio-443-exec-1 ERROR shauth 1083x1212x3 162b5os 10.9.30.109 /secure/CreateIssueDetails.jspa [CRM-PLUGIN] Could not find the custom field 'Contact'

2015-07-02 18:03:19,695 http-bio-443-exec-1 ERROR shauth 1083x1212x3 162b5os 10.9.30.109 /secure/CreateIssueDetails.jspa [CRM-PLUGIN] Could not find the custom field 'Case'

2015-07-02 18:03:19,982 http-bio-443-exec-1 ERROR shauth 1083x1212x3 162b5os 10.9.30.109 /secure/CreateIssueDetails.jspa [CRM-PLUGIN] Could not find the custom field 'Contact'

2015-07-02 18:03:19,982 http-bio-443-exec-1 ERROR shauth 1083x1212x3 162b5os 10.9.30.109 /secure/CreateIssueDetails.jspa [CRM-PLUGIN] Could not find the custom field 'Case'

2015-07-02 18:03:20,361 http-bio-443-exec-1 ERROR shauth 1083x1212x3 162b5os 10.9.30.109 /secure/CreateIssueDetails.jspa [canned.jira.utils.ConditionUtils] *************************************************************************************

2015-07-02 18:03:20,362 http-bio-443-exec-1 ERROR shauth 1083x1212x3 162b5os 10.9.30.109 /secure/CreateIssueDetails.jspa [canned.jira.utils.ConditionUtils] Condition failed on issue: HELP-49989, built-in script:com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.FasttrackTransition

java.lang.IllegalArgumentException: ProjectRole can not be null

    at com.atlassian.jira.security.roles.DefaultProjectRoleManager.getProjectRoleActors(DefaultProjectRoleManager.java:127)

    at com.atlassian.jira.security.roles.ProjectRoleManager$getProjectRoleActors$0.call(Unknown Source)

    at com.onresolve.scriptrunner.canned.jira.utils.ConditionUtils$_setupBinding_closure1.doCall(ConditionUtils.groovy:154)

    at Script4.run(Script4.groovy:1)

This widget could not be displayed.

looks like it can't find that role - is it still valid?

This widget could not be displayed.
Susan Hauth Community Champion Jul 02, 2015

Yes "Operations" is still valid. One of our mainstay well used roles and I just double checked in case the upgrade did anything to it, but looks the same.

This widget could not be displayed.

I just tested this on JIRA 6.4.1 and it worked fine... can you paste the following code in to the script console and run it:

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.security.roles.ProjectRoleManager


def projectRoleManager = ComponentAccessor.getComponent(ProjectRoleManager)
projectRoleManager.getProjectRole("Operations") ?: "Can't find role"

It should return the name of the role.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted 18 hours ago in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

45 views 1 0
Join discussion

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