6 answers

This has been discussed before, Thanos added an answer to this a while ago. I would suggest you do a thorough search in google before posting, since you can come up with a lot of information that is already out there.

But since I'm here, I'll tell you how to do this.

You got two options:

The hard way

Basically you need to create a custom scriptfunction that triggers on your transition.

The customScript should check that the issueType is a subtask, and if it isn't, it shouldn't do anything, but if it is, it should trigger creation of a subtask.

The easy way

However you will find this easier:

Go to postfunctions and add "create subtask" on your transition,

The screen should look like this:

In the condition field, you should check for the original Issuetype, and if it isn't subtask, you should return false, and if it is, you should return true.

Hi Daniel, Thanks for your reply. So, I have tried the easy way and it is working perfectly on the parent issue (postfuncion that creates a sub-task). However, it is not working when the post-function is on the subtask (that is on the same parent), it does nothing.

I updated to the latest version, but it does not work anyway. So, can you please help me out to understand what is going on?

Since I'm getting some presure here at work, I have done this:

1) set a post-function in the sub-task A,

2) that sub-task A ask to the parent issue to execute another post-function in order to create a sub-task B.

Thanks again!

You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.

java.lang.NullPointerException at com.atlassian.jira.issue.link.DefaultIssueLinkManager.getIssueLink(DefaultIssueLinkManager.java:373) at com.atlassian.jira.issue.link.DefaultIssueLinkManager.createIssueLink(DefaultIssueLinkManager.java:83) at com.atlassian.jira.issue.link.IssueLinkManager$createIssueLink$6.call(Unknown Source) at Script6945.run(Script6945.groovy:40)

You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.

But Is linking with the inverse sort of "Inward / Outward" link that I need.I need set to link "Inward Description" (Depends of Licensing)

e.g.:

With this script, where is setted "Licensing Dependency" name of link, when the subtask A generate the subtask B, the subtask A received the link "Licensing to" and subtask B "Depends of licensing". I need the reverse of this, as subtask A receive "Depends of Licensing" and subtask B receive "Licensing to".

Can you tel me how I do this?

Thanks.

You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.