Don't see all of the Post-function built-in scripts

Description

*This issue has moved*

This issue has been moved permanently to Adaptavist's Product Support JIRA instance.

All existing users of this instance should have the same username on our Product Support instance. However, you will very likely need to click on the
Can't access your account link in order to reset to a new password.

I am trying to use the fast-track transition feature on a new workflow. However, when I select script post-functions, I only see the following options:

  1. Send custom email

  2. Clone an issue and links

  3. Create sub-task

Environment

JIRA 4.2.4 on Solaris

Activity

Show:
Jamie Echlin
May 26, 2011, 11:14 AM

This was a problem with one of the velocity templates that only showed up in IE8, fixed now.

s
May 18, 2011, 12:52 AM

Hi, When I browse the page source,example:

<td bgcolor="ffffff" nowrap>
<p'">

<a href="AddWorkflowTransitionFunctionParams!default.jspa?cannedScript=com.onresolve.jira.groovy.canned.workflow.postfunctions.UpdateBlockedIssues&workflowName=Copy of jira&workflowMode=live&workflowStep=1&workflowTransition=4&pluginModuleKey=com.onresolve.jira.groovy.groovyrunner:rungroovy-function">Adds a comment to all blocked issues when this issue is transitioned.</a>
<br><span class="smallgrey">Adds a comment to all blocked issues when this issue is transitioned.<br>
This function should be put on the Resolve transition (or similar).
</span>
</p>
<p'">

<a href="AddWorkflowTransitionFunctionParams!default.jspa?cannedScript=com.onresolve.jira.groovy.canned.workflow.postfunctions.SendCustomEmail&workflowName=Copy of jira&workflowMode=live&workflowStep=1&workflowTransition=4&pluginModuleKey=com.onresolve.jira.groovy.groovyrunner:rungroovy-function">Send a custom email</a>
<br><span class="smallgrey">Send an email based on the provided template if conditions are met</span>
</p>

I found the problem is <p '"> is not recognized by IE, but is can be recognized by firefox.so I try to midify the file canned_runner.vm and change

#if ($cannedScriptDef.getCategories().contains($cat))

<p #if ($!cannedScript && $cannedScriptDef.class.Name == $!cannedScript) style="background-color:#CEE7FF; #end'">
<a href="${actionName}.jspa?cannedScript=$cannedScriptDef.class.name">$cannedScriptDef.name</a>
<br><span class="smallgrey">$cannedScriptDef.description</span>
#end
</p>
#end
#else
#if($!isInput)
#foreach($cannedScriptDef in $cannedScripts)
#if ($cannedScriptDef.getCategories().contains($!actionName))
<p #if ($!cannedScript && $cannedScriptDef.class.Name == $!cannedScript) style="background-color:#CEE7FF; #end'">
<a href="AddWorkflowTransition${actionName}Params!default.jspa?cannedScript=${cannedScriptDef.class.name}&workflowName=$

{workflowMode}&workflowStep=$

{workflowTransition}#if($

{pluginModuleKey}#end">$cannedScriptDef.name</a>
<br><span class="smallgrey">$cannedScriptDef.description</span>
</p>
#end
#end

TO:

#if ($cannedScriptDef.getCategories().contains($cat))

<p>
<a href="${actionName}.jspa?cannedScript=$cannedScriptDef.class.name">$cannedScriptDef.name</a>
<br><span class="smallgrey">$cannedScriptDef.description</span>
#end
</p>
#end
#else
#if($!isInput)
#foreach($cannedScriptDef in $cannedScripts)
#if ($cannedScriptDef.getCategories().contains($!actionName))
<p>
<a href="AddWorkflowTransition${actionName}Params!default.jspa?cannedScript=${cannedScriptDef.class.name}&workflowName=$

{workflowMode}&workflowStep=$

{workflowTransition}#if($

{pluginModuleKey}#end">$cannedScriptDef.name</a>
<br><span class="smallgrey">$cannedScriptDef.description</span>
</p>
#end
#end
#else
It seem to work well in IE, but I know too little about this, if it has more problem with this。

thank you very much!

smith

Jamie Echlin
May 17, 2011, 10:07 AM

Hi Ahmet,

Can you attach a screenshot of what you see, and ideally the html source of the page. Someone else had this problem but it was "resolved" by not using IE8.

> Maybe i'll try Groovyrunner 1.71 as mentioned above

Please do try or stay on the latest version of the plugin as it's easier to debug and fix issues if you're not already.

cheers, jamie

User known
May 17, 2011, 6:04 AM

Hi, i allready postet the same Problem in the wiki, but now with my logfile:

i want to use this Plugin to Copy Projects, but i can only see this built-in Scripts in the Script-Runner Panel:

  • Bulk Fix Resolutions

  • Switch to a different user

  • Reindex issues

  • <p '"> Copy custom field values ( the <p '''> is really listed as shown in Jira)

On the Project-Menu i cant see the Copy-Project-Script too.

Im using:

  • Jira 3.13.1-#333

  • groovyrunner-1.75.jar

  • groovy-all-1.7.10.jar

  • Java 6

  • Windows 2003 SP2

The Copy-Project-Script should be available on Jira 3.13

I testetd this with Mozilla Firefox 3.6.15 and IE 7

Here is my logfile content, there was no further errors:

******************************************************************************************************
JIRA 3.13.1 build: 333 (Enterprise Edition) started. You can now access JIRA through your web browser.
******************************************************************************************************

2011-05-17 14:50:32,868 ajp-127.0.0.1-28409-2 DEBUG [onresolve.jira.groovy.GroovyRunner] doValidation
2011-05-17 14:50:37,384 ajp-127.0.0.1-28409-2 DEBUG [onresolve.jira.groovy.ScriptManagerImpl] Loading properties
2011-05-17 14:50:37,524 ajp-127.0.0.1-28409-2 DEBUG [onresolve.jira.groovy.CannedScriptRunner] Class not loaded: com.onresolve.jira.groovy.canned.admin.ConditionTester
2011-05-17 14:50:38,321 ajp-127.0.0.1-28409-2 DEBUG [onresolve.jira.groovy.JiraGroovyResourceLoader] Modifying resource from com.onresolve.jira.groovy.canned.utils.WorkflowUtils to com.onresolve.jira.groovy.canned.utils.WorkflowUtils13 for current build 333 - has range min: 1 max: 518
2011-05-17 14:50:39,134 ajp-127.0.0.1-28409-2 DEBUG [onresolve.jira.groovy.CannedScriptRunner] Class not loaded: com.onresolve.jira.groovy.canned.admin.BulkFixResolutions
2011-05-17 14:50:39,196 ajp-127.0.0.1-28409-2 DEBUG [onresolve.jira.groovy.JiraGroovyResourceLoader] Modifying resource from com.onresolve.jira.groovy.canned.utils.FilterUtils to com.onresolve.jira.groovy.canned.utils.FilterUtils313 for current build 333 - has range min: 1 max: 465
2011-05-17 14:50:39,696 ajp-127.0.0.1-28409-2 DEBUG [onresolve.jira.groovy.CannedScriptRunner] Class not loaded: com.onresolve.jira.groovy.canned.workflow.postfunctions.SendCustomEmail
2011-05-17 14:50:40,134 ajp-127.0.0.1-28409-2 DEBUG [onresolve.jira.groovy.CannedScriptRunner] File com.onresolve.jira.groovy.canned.admin.RenameUser out of range for this build 333
2011-05-17 14:50:40,149 ajp-127.0.0.1-28409-2 DEBUG [onresolve.jira.groovy.CannedScriptRunner] Class not loaded: com.onresolve.jira.groovy.canned.workflow.postfunctions.CloneIssue
2011-05-17 14:50:40,649 ajp-127.0.0.1-28409-2 DEBUG [onresolve.jira.groovy.JiraGroovyResourceLoader] Modifying resource from com.onresolve.jira.groovy.canned.utils.WorkflowUtils to com.onresolve.jira.groovy.canned.utils.WorkflowUtils13 for current build 333 - has range min: 1 max: 518
2011-05-17 14:50:40,759 ajp-127.0.0.1-28409-2 DEBUG [onresolve.jira.groovy.CannedScriptRunner] Class not loaded: com.onresolve.jira.groovy.canned.workflow.conditions.SimpleScriptedCondition
2011-05-17 14:50:40,821 ajp-127.0.0.1-28409-2 DEBUG [onresolve.jira.groovy.CannedScriptRunner] Class not loaded: com.onresolve.jira.groovy.canned.admin.SwitchUser
2011-05-17 14:50:41,071 ajp-127.0.0.1-28409-2 DEBUG [onresolve.jira.groovy.CannedScriptRunner] Class not loaded: com.onresolve.jira.groovy.canned.admin.CopyProject
2011-05-17 14:50:41,071 ajp-127.0.0.1-28409-2 DEBUG [onresolve.jira.groovy.JiraGroovyResourceLoader] Modifying resource from com.onresolve.jira.groovy.canned.admin.CopyProject to com.onresolve.jira.groovy.canned.admin.CopyProject313 for current build 333 - has range min: 330 max: 465
2011-05-17 14:50:42,009 ajp-127.0.0.1-28409-2 DEBUG [onresolve.jira.groovy.CannedScriptRunner] Class not loaded: com.onresolve.jira.groovy.canned.admin.ReindexIssues
2011-05-17 14:50:42,040 ajp-127.0.0.1-28409-2 DEBUG [onresolve.jira.groovy.JiraGroovyResourceLoader] Modifying resource from com.onresolve.jira.groovy.canned.utils.FilterUtils to com.onresolve.jira.groovy.canned.utils.FilterUtils313 for current build 333 - has range min: 1 max: 465
2011-05-17 14:50:42,212 ajp-127.0.0.1-28409-2 DEBUG [onresolve.jira.groovy.CannedScriptRunner] Class not loaded: com.onresolve.jira.groovy.canned.workflow.postfunctions.UpdateBlockedIssues
2011-05-17 14:50:42,274 ajp-127.0.0.1-28409-2 DEBUG [onresolve.jira.groovy.JiraGroovyResourceLoader] Modifying resource from com.onresolve.jira.groovy.canned.utils.WorkflowUtils to com.onresolve.jira.groovy.canned.utils.WorkflowUtils13 for current build 333 - has range min: 1 max: 518
2011-05-17 14:50:42,321 ajp-127.0.0.1-28409-2 DEBUG [onresolve.jira.groovy.CannedScriptRunner] Class not loaded: com.onresolve.jira.groovy.canned.workflow.postfunctions.FasttrackTransition
2011-05-17 14:50:42,446 ajp-127.0.0.1-28409-2 DEBUG [onresolve.jira.groovy.JiraGroovyResourceLoader] Modifying resource from com.onresolve.jira.groovy.canned.utils.WorkflowUtils to com.onresolve.jira.groovy.canned.utils.WorkflowUtils13 for current build 333 - has range min: 1 max: 518
2011-05-17 14:50:42,493 ajp-127.0.0.1-28409-2 DEBUG [onresolve.jira.groovy.CannedScriptRunner] File com.onresolve.jira.groovy.canned.admin.ChangeSharedEntityOwnership out of range for this build 333
2011-05-17 14:50:42,493 ajp-127.0.0.1-28409-2 DEBUG [onresolve.jira.groovy.CannedScriptRunner] Class not loaded: com.onresolve.jira.groovy.canned.workflow.validators.SimpleScriptedValidator
2011-05-17 14:50:42,556 ajp-127.0.0.1-28409-2 DEBUG [onresolve.jira.groovy.CannedScriptRunner] Class not loaded: com.onresolve.jira.groovy.canned.workflow.postfunctions.ResolveParentAfterSubtasks
2011-05-17 14:50:42,634 ajp-127.0.0.1-28409-2 DEBUG [onresolve.jira.groovy.JiraGroovyResourceLoader] Modifying resource from com.onresolve.jira.groovy.canned.utils.WorkflowUtils to com.onresolve.jira.groovy.canned.utils.WorkflowUtils13 for current build 333 - has range min: 1 max: 518
2011-05-17 14:50:42,681 ajp-127.0.0.1-28409-2 DEBUG [onresolve.jira.groovy.CannedScriptRunner] Class not loaded: com.onresolve.jira.groovy.canned.workflow.postfunctions.FireEventWhen
2011-05-17 14:50:42,743 ajp-127.0.0.1-28409-2 DEBUG [onresolve.jira.groovy.JiraGroovyResourceLoader] Modifying resource from com.onresolve.jira.groovy.canned.utils.WorkflowUtils to com.onresolve.jira.groovy.canned.utils.WorkflowUtils13 for current build 333 - has range min: 1 max: 518
2011-05-17 14:50:42,774 ajp-127.0.0.1-28409-2 DEBUG [onresolve.jira.groovy.CannedScriptRunner] Class not loaded: com.onresolve.jira.groovy.canned.admin.CopyCustomField
2011-05-17 14:50:43,040 ajp-127.0.0.1-28409-2 DEBUG [onresolve.jira.groovy.CannedScriptRunner] Class not loaded: com.onresolve.jira.groovy.canned.workflow.conditions.AllSubtasksResolvedCondition

Hope this can be fixed.
Maybe i'll try Groovyrunner 1.71 as mentioned above

Thx

s
May 5, 2011, 7:34 AM

Jamie,When I test groovyrunner1.71,The post-function work well,but not work in Condition & Validator.
in validator I got the msg:
2011-04-22 00:09:46,313 http-8080-3 WARN admin 9x498x1 16xprfc 192.168.128.1 /se
cure/admin/workflows/AddWorkflowTransitionValidatorParams!default.jspa [velocity
] org.apache.velocity.runtime.exception.ReferenceException: reference : template
= /templates/groovy/canned_runner.vm [line 162,column 53] : $param.Label is not
a valid reference.
at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTRefere
nce.java:277)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java
and in condition,I can only see

Built-in Scripts Simple scripted condition
the "Script file path:" missed.
Thanks very much!
smith.

Fixed
Your pinned fields
Click on the next to a field label to start pinning.

Assignee

Jamie Echlin

Reporter

Johnetta Valentine

Labels

Internal Complexity

Unknown

Internal Value

Unknown