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

0 vote
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!!!

 

0 vote

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

0 vote
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)

0 vote

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

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

0 vote

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 Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,311 views 14 20
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot