I'm scheduling creation of Issues with Sub-Tasks. I plan to do this via API, and have created the JSON file for creating a Story. No problem.
What I'm trying to do now is create a number of Sub-Tasks for that newly created issue. My understanding is that this can't all be done via a single action. If I want to bulk create 5 Sub-Tasks for the story, would I have to do a GET request to return the latest issue created in my project and then insert that via variable into the next POST for creating the Sub-Tasks? All the examples I've found for Sub-Task creation have hard-coded issuekeys in them.
Hello @Dan Bower
Are you asking a question, or just stating the exact method of how Sub-tasks are created?
PS. There is no need to do a GET after the parent Story is created. When you do the POST to create that Story, its ID is returned in the JSON response, so just parse that bit of data out of the response, then use it in the subsequent POST requests to create the child Sub-tasks.
Question is how do I parse and pass that value? Or does that depend. I'm trying to do this using the Ansible uri module, but am open to alternatives.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, it depends totally on the language / toolset you are using, what form it receives the JSON response and how to manipulate that object and get specific bits of data from it.
I don't use Ansible, so can't help any further, but I'm sure a quick Google search on the topic will yield lots of examples and methods.
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.