I have coded our current JIRA (5.2.6) to create two sub-task on specific workflow transition. Our business users have one request. They want that sub-task should have the same summary as parent ticket + a prefix. Example:
Parent ticket summary: "Good summary"
Sub-task summary: "[Text] Good summary"
So i tried to modify script:
issue.summary = "[Text]" + transientVars["issue"].summary
but it did not worked.
Can anyone help me with that ?
It's a bit ugly but this is the correct code:
issue.summary = "[Text] " + transientVars["originalissueobject"].summary
Hm, it seems that it does not work. When i set this script then sub-task is not created. If i specify issue.summary =
"[Text]" then sub-task with [Text] summary is created.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tested this and it did work - try putting your function last in the list of post-functions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jamie,
I have several questions. Lets start from begining. With your plugin i create a Sub-task listener. Listener configurations:
------------------------------------------------------- ID Parameters 0 Create a sub-task. Subtask will be created with issue type: Descriptions Sub-task Events: [Subtask Created] Projects: [MOD] Edit | Delete | Move down ------------------------------------------------------- 1 Create a sub-task. Subtask will be created with issue type: Photography Sub-task Events: [Subtask Created] Projects: [MOD] Edit | Delete | Move up ------------------------------------------------------
Now these listeners are working and creates Sub-task on specifick transition and on "Custom Event".
But when i put issue.summary =
"[Text]" then sub-task with [Text] summary is created.
in "Additional issue actions" then listeners do not work. Please see attached image:
Please addvise what i am doing wrong ?
Basically what i need? Example:
On specific transition or workflow in need to create two or more sub-task with summarry: [Description] Parent issue summary.
Looking forward to hearing from you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not really sure what you're trying to do. But when i put issue.summary = "[Text]" then sub-task with [Text] summary is created. is not valid code, I would assume you haven't actually put that, but it's in the screenshot as well.
If the code is invalid (additional script is compiled to code) there will be errors in the log file.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry for the mistake. I am putting:
issue.summary =
"[Text] "
+ transientVars[
"originalissueobject"
].summary
but it seem that then listener do not work. I mean sub-task is not created.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
And the logs say...?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
can't find anything attached, can you paste to gist.github.com or pastebin.com
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
transientVars is only available in workflow functions, you should use "event.issue.summary".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't have skype, sorry. Use this:
issue.summary =
"[Text] "
+
event.issue.summary
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Now i used
issue.summary =
"[Text] "
+
event.issue.summary
[
"originalissueobject"
]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jamie,
Maybe there is another way to contact you on-real time ?
I have another question about Grovvy Runner plugin.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did that work? I'm sure you can understand why I do not do private support consultations for people, unless they are paying.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jamie,
It did not worked and the same error is shown, I am confused. It is the only thing i need, in order to to finish task from boss. :(
P.S. now i understand you. There is nothing for free in this world :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jamie,
Maybe you could advice me how to add
issue.summary =
"[Text] "
+ transientVars[
"originalissueobject"
].summary
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jamie,
I found when it works: issue.summary = '[Description] ' + issue.summary
But another small issue appears. If i executing one again the same transition (on which Script listener is working) additional subtask is created. Ho to avoid that ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to use the "condition" to check for existing subtasks of the kind that you care about...
! issue.subtaskObjects.any{ it.issueType.name == "Sub-task"}
for example.
> P.S. now i understand you. There is nothing for free in this world :)
Are you kidding me!? You haven't paid for all the expert advice I've been giving you, nor for the plugin myself.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry Jamie,
I did not want to offend your. I respect your advices.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No problem, no offence taken.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am using Script Runner. I am creating a listener for a specific transition, on which execution JIRa will create two sub-tasks with specific summary. Summary consist of [Prafix]+"Parent ticket summary" Here is a screen shot what i want to do:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What is the context here... what plugin are you using, is this usinga built-in script function?
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.