Hi team,
I am trying to automate a Rovo agent in Jira Cloud (team-managed project). Requirement:
When a work item of type Story is moved to status In Progress, the agent should generate test cases and those tests should be created automatically in Jira (as Subtasks on that Story). I should not have to copy JSON from Chat or create the tests by hand.
What I have done
- Created a custom Rovo agent in Studio (instructions: MODE CREATE_TEST_CASES, return JSON only with a newTests array: summary, priority, type, description).
- From the agent, I used “Add automation trigger”.
- Trigger text: When a work item in my project is transitioned to In Progress and the issue type is Story.
- Instructions: MODE CREATE_TEST_CASES, return JSON for {{issue.key}} so automation can create subtasks.
- On the rule that opened, I added the “Create sub-tasks” action:
- Work item: Current work item
- Type: Subtask
- Summary: I am not sure what to put here ({{test.summary}} vs a fixed title).
What is happening
- Moving the Story to In Progress sometimes runs the agent and I get JSON in Chat or in agentResponse.
- Subtasks are not created (or only a blank/wrong subtask is created).
- I understand from docs that if an agent is used in an automation flow it cannot use its own tools and only returns text via {{agentResponse}}.
https://support.atlassian.com/studio/docs/add-tools-to-rovo-agents/
https://support.atlassian.com/rovo/docs/agents-in-automations/
Questions
- For this use case, should I use the Studio “Add automation trigger” wizard, or a normal Jira Automation rule with the “Use Rovo agent” action?
- After “Use agent”, how do I create one Subtask per item in the JSON array? Is the correct pattern:
For each / Advanced branching on {{agentResponse.asObject.newTests}}
then Create work item / Create sub-tasks with {{test.summary}} and {{test.description}}? - Does “Create sub-tasks” (current work item) support looping over agentResponse, or do I have to use Create work item inside a For each branch?
- If the agent returns markdown around the JSON, will {{agentResponse.asObject.newTests}} be empty? Any tips to force JSON-only output?
- Team-managed project has no Test issue type — is Subtask on the Story the recommended type for auto-created tests?
Project type: Jira Software Cloud, team-managed. Agent is custom (Studio). I am not asking for an exploit or anything outside my own site.
Thanks.
Subash B