Creating subtasks on an issue
In this recipe, we will demonstrate how to create a subtask from a JIRA plugin. It is very similar to the issue creation, but there are some notable differences.
Subtasks are useful for splitting up a parent issue into a number of tasks, which can be assigned and tracked separately. The progress on an issue is generally a sum of the progress on all its subtasks, although people use it for a lot of other purposes too.
How to do it...
There are two steps to creating a subtask:
Create an issue object. A subtask object is nothing but an issue object in the backend. The only difference is that it has a parent issue associated with it. So, when we create a subtask issue object, we will have to define the parent issue in addition to what we normally do while creating a normal issue.
Link the newly created subtask issue to the parent issue.
Let's see these steps in more detail:
Create the subtask issue object similar to how we created the issue in the previous recipe. Here...