Set focus on a cloned issue

Oded Priva June 23, 2014

Hi,

I'm using script runner to clone an issue during trantision, the probelm is that there is no notification when that issue is created.

Is there a way to automatically switch to the new issue ? or at least get that little notification box syaing that an issue is created with a link to that issue?

2 answers

0 votes
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 23, 2014

Oded - if you can use 3.0-beta you can use this method in the additional actions: https://jamieechlin.atlassian.net/wiki/display/GRV/Providing+feedback+from+scripts

Oded Priva June 23, 2014

Thanks Jamie.. I will check it out..

Oded Priva June 27, 2014

Hi jamie,

After upgrading to 3.0, We started getting this error in the catalina.log file :

/secure/QuickCreateIssue.jspa [scriptrunner.jira.workflow.ScriptWorkflowFunction] Script function failed on issue: IC-22994, actionId: 1, file: null

groovy.util.ResourceException: Malformed URL: bundle://147.0:0/, null

any idea why?

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 27, 2014

Hi there... can you check the workflow functions you have on the create transition? Somehow the file path is null or it's inaccessible...?

Oded Priva June 28, 2014

Hi,

MY scripts are under /home/jira/scripts together with some private plugins, to specify this place I added the following lines to setenv.sh file in jira installation.

----

CLASSPATH=/home/jira/scripts

export CLASSPATH

----

My catalina is as follows : ( taken from the startup details )

CATALINA_BASE: /usr/local/atlassian/jira

Using CLASSPATH: /home/jira/scripts:/usr/local/atlassian/jira/bin/bootstrap.jar:/usr/local/atlassian/jira/bin/tomcat-juli.jar

I saw the 'breaking changes' wrriten in the 'Upgrading to 3.0' document but when I added "-Dplugin.script.roots=/home/jira/scripts" to the startup, My script are still not get "picked" by the script runner.

Can you please advice?

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 28, 2014

How is the script file path displayed in the UI, for the script in the particular workflow action?

Oded Priva June 28, 2014

/home/jira/scripts/com/onresolve/jira/groovy/canned/workflow/postfunctions/LinkToIssue.groovy

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 29, 2014

Is this a plain script or is it using the CannedScript interface? If it is, can you send it to me, <firstname>.<lastname>@gmail.com.

Oded Priva June 29, 2014

It is a cannedScript ..

I sent it to you.

Thanks a lot !

Oded Priva July 9, 2014

Hi Jamie,

The message is working great .. is there a way to add a link ( or just the issue key ) to the newly cloned issue in the message?

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 9, 2014

I think the issue key of the newly cloned issue is available as issue.key, no?

OdedP September 30, 2014

Thanks Jamie, issue.key returns a null value .. Any other suggestions ?

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 1, 2014

Sorry - is this a continuation of an old question? When you say "The message is working great" are you talking about the green popup thing after the workflow function runs?

Oded Priva October 5, 2014

Yes .. "the green popup thing after the workflow function runs" but when I'm using issue.key I get a null on the message ..

0 votes
Vijay Khacharia
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 23, 2014

Hi,

This is not possible by default. I think its correct that the old issue is shown with new status as that was the intention of the user. In background whatever needs to be done is done, like clone of issue. User gets a link to the cloned issue anyways in the current issue as linked task.

Vijay

Oded Priva June 23, 2014

Jira default behaviour is to set focuse on the newly cloned issue.

Is there a way get this default behaviour with script runner?

or .. is there a way to notify the user " your cloned issue is .... " ?

Vijay Khacharia
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 23, 2014

Yes JIRA default behaviour is based on user intention to clone the issue. So that is correctly implemented to open the cloned issue.

Notification is not by the way of pop-up/message box. But it is a link to the current issue "Cloned".

I dont think without custom implementation, you can achieve what you want.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events