Hi all,
I am using JIRA 4.4.5, and script runner 2.0.7.
I am using the script post-function "Clones an issue and links".
It works perfectly, but i would like that the attachments were not cloned .
In Additional Code i already tried put this :
checkAttachment = {attachment ->
false
}
But it not worked.
I would like that the attachments were not cloned and that the issue moved for another project was for a status "Investigating" instead "Open"
Please could you help me ?
Best regards
Fabio
You shouldn't block closing on outbound lines, and the clone and link should create an outbound link. Maybe the direction of your links are the wrong way round... there is a long-running jira bug where the Cloners link descriptions are reversed. This is fixed in a later version of jira... https://jira.atlassian.com/browse/JRA-24563, https://jira.atlassian.com/browse/JRA-24563
Hi Jamie , Thanks for your help. I will try configure the conditions presented in workflow tool box. By the way, the fast track transition only works for some projects. For other the message below is shown: Exception in thread "Thread-xxxx" java.lang.NullPointerException: Cannot invoke method get() on null object at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:77) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:32) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:54) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at com.onresolve.jira.groovy.canned.workflow.postfunctions.FasttrackTransition.doTransition(FasttrackTransition.groovy:118) at com.onresolve.jira.groovy.canned.workflow.postfunctions.FasttrackTransition.this$2$doTransition(FasttrackTransition.groovy) at sun.reflect.GeneratedMethodAccessor3623.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1054) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN(ScriptBytecodeAdapter.java:78) at com.onresolve.jira.groovy.canned.workflow.postfunctions.FasttrackTransition.this$dist$invoke$1(FasttrackTransition.groovy) at com.onresolve.jira.groovy.canned.workflow.postfunctions.FasttrackTransition$1.methodMissing(FasttrackTransition.groovy) at sun.reflect.GeneratedMethodAccessor3622.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaClassImpl.invokeMissingMethod(MetaClassImpl.java:811) at groovy.lang.MetaClassImpl.invokePropertyOrMissing(MetaClassImpl.java:1103) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1056) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:884) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:149) at com.onresolve.jira.groovy.canned.workflow.postfunctions.FasttrackTransition$1.run(FasttrackTransition.groovy:92) at java.lang.Thread.run(Unknown Source) Please could you help me ? Best regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you using additional code? I think you should consider upgrading, your jira version is out of support.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jamie, I removed the additional code and it worked. But this is unstable. For the 3 issues that i used the fast track , only 2 worked. Did you already see it ? Best Regards Fabio
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If it doesn't work then that version, which is very old, doesn't support selective copying of attachments.
Setting the initial status is also not straightforward, I would try putting a fast-track function on the create step, and checking for the presence of something the Clone function can set.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jamie, The fast track function worked :). Regarding attachment clone, it worked using a version 1.8.1. How can i change the link direction of the clone issue ? I have a condition in my workflow that only permit close an issue if your clone already was closed. I have two projects A and B. The issues of the Project A shall be blocked by issues of the Project B after the script "Clones an issue and links" . But i have a big problem. Always that i clone an issue of the Project A and move for Project B (through "Clones an issue and links") the issue moved for other Project B is blocked by issue of Project A. So , for closure of the issues from Project B I need delete the previous link and create a new link manually. It doesn´t matter if the link is "blocks" or "is blocked by". Always the issue of Project A blocks the issue of the Project B using the script "Clones an issue and links". How can i fix this ? Can I add any "Additional Code" for that this link direction will be changed ? Best Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How does it prevent issue A from being closed? This is some additional condition you've added...?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jamie , I am using the plugin ( com.atlassian.jira.plugin.workflow.blockinglinks). So, in both projects i include this condition for the button "Close" will be shown. The linked issue must have one of the following statuses to allow issue transitions: Closed, $status.getString("name") or $status.getString("name"). Any clue ? Best Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.