Hi guys,
I have this workflow whereupon a transition, Issue A receives the subtask "Review".
Currently, when it is transitioned it's just called "Review", but what I'd like to happen is that it would be called... "A: Review" so that it inherits the original task name. This would help me differentiate between each issue a little bit better.
I'm using ScriptRunner to do this.
So I guess, what would be the code for this? Where do I find out where the object's properties are?
My pseudocode would be something like this:
subtask.name = task.name + ": " + subtask.name
Is anyone able to help?
How are you creating the sub-task?
The reason I ask is that I suspect you are creating it in a post function on the transition, which is fine, but if your code is just saying issue.summary, then it's referring to the parent issue (and then not setting it because your code is all about the sub-task)
I say this is a guess, but it's exactly the mistake I made the first couple of times I tried to create sub-tasks in scripts, so I may be guessing the wrong thing!
That's exactly what I'm doing. So how am I supposed to do it then?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So I tried this line of code in the "additional issue actions box":
issue.summary = '[' + sourceIssue.summary + ']' + 'Review'
Which I was hoping would make it look like:
[A] Review
But It doesn't work. It just creates the subtask with the subtask summary that was already set (Review).
Can anyone help me with this?
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.