You really do need to think through your code. The line above IS working fine, but it's not doing what you expect.
Try looking at what it is actually returning - that should tell you more. For example, is id 1 really Bug? Are you looking at the right issue and is it definitely a Bug?
(If it's a sub-task, I really do think you'll find it is NOT a bug, but I don't have access to your system to check that instinct)
Sorry, that's not what I meant. We don't know what you are doing with "creating the subtask". If you've got the issue id, then you should have, or be able to get, an issue object, and then read that for more information (including type - where Conrad's answer is what you need to look at)
I am in learning of JIRA and given the tasks how exactly we can implement the plugin for so and so required functionality.
Hence instead of going for third party plugin, I develop my own
and also in Create-on-transition-plugin I customized the fields which I don't require .
Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs