{"cloud":true,"rules":[{"id":34203705,"clientKey":"4d654250-a879-3fb4-9f38-8355e892a57d","name":"Clone Test Plan","state":"ENABLED","description":"","authorAccountId":"712020:249bcfb2-e9bd-4e7c-adde-d51fc6170ac5","actor":{"type":"ACCOUNT_ID","value":"557058:f58131cb-b67d-43c7-b30d-6b58d40bd077"},"created":1786610363487,"updated":1786622158191,"trigger":{"id":"ec74005c-1770-4e2e-900c-f6e6850f9fd3","parentId":null,"conditionParentId":null,"component":"TRIGGER","type":"jira.manual.trigger.issue","value":{"inputFromUsers":false,"inputPrompts":[],"groups":[],"issueFilter":{"filterType":"ISSUE_TYPE","value":["Test Plan"]},"jQLFilter":null},"conditions":[],"children":[],"schemaVersion":3,"connectionId":null,"checksum":null},"components":[{"id":"c795eb29-5d6a-4449-932b-e0eb1609f02e","parentId":null,"conditionParentId":null,"component":"ACTION","type":"jira.issue.outgoing.webhook","value":{"url":"https://xray.cloud.getxray.app/api/v2/authenticate","urlSecure":false,"headers":[{"id":"_header_1786608302153","name":"Content-Type","value":"Application/JSON","headerSecure":false}],"sendIssue":false,"contentType":"custom","customBody":"{\n  \"client_id\": \"<ADD_CLIENT_ID_HERE>\",\n  \"client_secret\": \"<ADD_CLIENT_SECRET_HERE>\"\n}","method":"POST","responseEnabled":true,"continueOnErrorEnabled":false},"conditions":[],"children":[],"schemaVersion":1,"connectionId":null,"checksum":null},{"id":"5fc6e9f7-a21d-4192-9558-d5f9907296ed","parentId":null,"conditionParentId":null,"component":"ACTION","type":"jira.create.variable","value":{"id":"_customsmartvalue_id_1786608956777","name":{"type":"FREE","value":"xrayToken"},"type":"SMART","query":{"type":"SMART","value":"{{webResponse.body}}"},"lazy":false},"conditions":[],"children":[],"schemaVersion":1,"connectionId":null,"checksum":null},{"id":"9e1f75cf-be76-492e-8f8d-ad44572f4032","parentId":null,"conditionParentId":null,"component":"ACTION","type":"jira.issue.outgoing.webhook","value":{"url":"https://xray.cloud.getxray.app/api/v2/graphql","urlSecure":false,"headers":[{"id":"_header_1786609182447","name":"Content-Type","value":"Application/JSON","headerSecure":false},{"id":"_header_1786609212313","name":"Authorization","value":"Bearer {{xrayToken}}","headerSecure":false}],"sendIssue":false,"contentType":"custom","customBody":"{\n  \"query\": \"query($issueId: String!) { getTestPlan(issueId: $issueId) { issueId tests(limit: 100) { total results { issueId } } } }\",\n  \"variables\": { \"issueId\": \"{{issue.id}}\" }\n}","method":"POST","responseEnabled":true,"continueOnErrorEnabled":false},"conditions":[],"children":[],"schemaVersion":1,"connectionId":null,"checksum":null},{"id":"12366624-f477-4df0-bf5d-15c7dfeed708","parentId":null,"conditionParentId":null,"component":"ACTION","type":"codebarrel.action.log","value":"Status: {{webResponse.status}} Body: {{webResponse.body}}","conditions":[],"children":[],"schemaVersion":1,"connectionId":null,"checksum":null},{"id":"d9a17c4f-b79f-4800-92aa-dad614a3359f","parentId":null,"conditionParentId":null,"component":"ACTION","type":"jira.create.variable","value":{"id":"_customsmartvalue_id_1786609348537","name":{"type":"FREE","value":"testPlanData"},"type":"SMART","query":{"type":"SMART","value":"{{webResponse.body.data.getTestPlan}}"},"lazy":false},"conditions":[],"children":[],"schemaVersion":1,"connectionId":null,"checksum":null},{"id":"79617bb7-a34b-4910-bcf8-656d7c48ac74","parentId":null,"conditionParentId":null,"component":"ACTION","type":"codebarrel.action.log","value":"testPlanData: {{testPlanData}}","conditions":[],"children":[],"schemaVersion":1,"connectionId":null,"checksum":null},{"id":"7e750cad-884f-472e-8cdc-6ae6abb18e12","parentId":null,"conditionParentId":null,"component":"ACTION","type":"jira.issue.clone","value":{"operations":[{"field":{"type":"ID","value":"project"},"fieldType":"project","type":"SET","value":{"type":"COPY","value":"current"}},{"field":{"type":"ID","value":"issuetype"},"fieldType":"issuetype","type":"SET","value":{"type":"COPY","value":"current"}},{"field":{"type":"ID","value":"summary"},"fieldType":"summary","type":"SET","value":"CLONE - {{issue.summary}}"}],"advancedFields":null,"sendNotifications":false},"conditions":[],"children":[],"schemaVersion":12,"connectionId":null,"checksum":null},{"id":"c9ae58f3-b3e5-4c1f-8b7c-09d83b318621","parentId":null,"conditionParentId":null,"component":"ACTION","type":"jira.issue.refresh.issue","value":{"delayMs":null},"conditions":[],"children":[],"schemaVersion":1,"connectionId":null,"checksum":null},{"id":"f94781c0-b231-4ba0-8197-c0e4d0a00e4c","parentId":null,"conditionParentId":null,"component":"ACTION","type":"jira.issue.outgoing.webhook","value":{"url":"https://xray.cloud.getxray.app/api/v2/graphql","urlSecure":false,"headers":[{"id":"_header_1786613632679","name":"Content-Type","value":"Application/JSON","headerSecure":false},{"id":"_header_1786613662031","name":"Authorization","value":"Bearer {{xrayToken}}","headerSecure":false}],"sendIssue":false,"contentType":"custom","customBody":"{\n  \"query\": \"mutation($issueId: String!, $testIds: [String]!) { addTestsToTestPlan(issueId: $issueId, testIssueIds: $testIds) { addedTests warning } }\",\n  \"variables\": {\n    \"issueId\": \"{{createdIssue.id}}\",\n    \"testIds\": {{webResponse.body.data.getTestPlan.tests.results.issueId.asJsonStringArray}}\n  }\n}","method":"POST","responseEnabled":true,"continueOnErrorEnabled":false},"conditions":[],"children":[],"schemaVersion":1,"connectionId":null,"checksum":null},{"id":"a71b089b-e450-4962-828b-034894168b58","parentId":null,"conditionParentId":null,"component":"ACTION","type":"jira.issue.outgoing.webhook","value":{"url":"https://xray.cloud.getxray.app/api/v2/graphql","urlSecure":false,"headers":[{"id":"_header_1786614634560","name":"Content-Type","value":"Application/JSON","headerSecure":false},{"id":"_header_1786614690708","name":"Authorization","value":"Bearer {{xrayToken}}","headerSecure":false}],"sendIssue":false,"contentType":"custom","customBody":"{\n  \"query\": \"query($issueId: String!) { getTestPlan(issueId: $issueId) { issueId testExecutions(limit: 100) { total results { issueId jira(fields: [\\\"summary\\\"]) testEnvironments tests(limit: 100) { total results { issueId } } } } } }\",\n  \"variables\": { \"issueId\": \"{{issue.id}}\" }\n}","method":"POST","responseEnabled":true,"continueOnErrorEnabled":false},"conditions":[],"children":[],"schemaVersion":1,"connectionId":null,"checksum":null},{"id":"a489ac5f-0843-4b5d-bd86-6792eebe2abd","parentId":null,"conditionParentId":null,"component":"BRANCH","type":"jira.smart.values.branch","value":{"id":"_customsmartvalue_id_1786609813466","name":{"type":"FREE","value":"execItem"},"type":"SMART","query":{"type":"SMART","value":"{{webResponse.body.data.getTestPlan.testExecutions.results}}"},"lazy":false},"conditions":[],"children":[{"id":"bbd49cdb-494e-4e13-ad8d-4c55c5027dc8","parentId":"a489ac5f-0843-4b5d-bd86-6792eebe2abd","conditionParentId":null,"component":"ACTION","type":"codebarrel.action.log","value":"Exec Item: {{execItem}}","conditions":[],"children":[],"schemaVersion":1,"connectionId":null,"checksum":null},{"id":"3bcc7ddd-428a-4b64-88ac-4ec2cedf502a","parentId":"a489ac5f-0843-4b5d-bd86-6792eebe2abd","conditionParentId":null,"component":"ACTION","type":"jira.issue.outgoing.webhook","value":{"url":"https://xray.cloud.getxray.app/api/v2/graphql","urlSecure":false,"headers":[{"id":"_header_1786609856003","name":"Content-Type","value":"Application/JSON","headerSecure":false},{"id":"_header_1786609887898","name":"Authorization","value":"Bearer {{xrayToken}}","headerSecure":false}],"sendIssue":false,"contentType":"custom","customBody":"{\n  \"query\": \"mutation($testIssueIds: [String], $testEnvs: [String], $summary: String!, $projectKey: String!) { createTestExecution(testIssueIds: $testIssueIds, testEnvironments: $testEnvs, jira: { fields: { summary: $summary, project: { key: $projectKey } } }) { testExecution { issueId } } }\",\n  \"variables\": {\n    \"testIssueIds\": {{execItem.tests.results.issueId.asJsonStringArray}},\n    \"testEnvs\": {{execItem.testEnvironments.asJsonStringArray}},\n    \"summary\": {{execItem.jira.summary.asJsonString}},\n    \"projectKey\": \"{{issue.project.key}}\"\n  }\n}","method":"POST","responseEnabled":true,"continueOnErrorEnabled":false},"conditions":[],"children":[],"schemaVersion":1,"connectionId":null,"checksum":null},{"id":"66626626-1018-4a42-b832-b00264199e0d","parentId":"a489ac5f-0843-4b5d-bd86-6792eebe2abd","conditionParentId":null,"component":"ACTION","type":"jira.issue.outgoing.webhook","value":{"url":"https://xray.cloud.getxray.app/api/v2/graphql","urlSecure":false,"headers":[{"id":"_header_1786610186312","name":"Content-Type","value":"Application/JSON","headerSecure":false},{"id":"_header_1786610217265","name":"Authorization","value":"Bearer {{xrayToken}}","headerSecure":false}],"sendIssue":false,"contentType":"custom","customBody":"{\n  \"query\": \"mutation($issueId: String!, $testExecIds: [String]!) { addTestExecutionsToTestPlan(issueId: $issueId, testExecIssueIds: $testExecIds) { addedTestExecutions warning } }\",\n  \"variables\": {\n    \"issueId\": \"{{createdIssue.id}}\",\n    \"testExecIds\": [\"{{webResponse.body.data.createTestExecution.testExecution.issueId}}\"]\n  }\n}","method":"POST","responseEnabled":true,"continueOnErrorEnabled":false},"conditions":[],"children":[],"schemaVersion":1,"connectionId":null,"checksum":null},{"id":"2b12dcb3-566f-40eb-8097-dd7860e13d5b","parentId":"a489ac5f-0843-4b5d-bd86-6792eebe2abd","conditionParentId":null,"component":"ACTION","type":"codebarrel.action.log","value":"Added Test Executions: {{webResponse.body.data.addTestExecutionsToTestPlan.addedTestExecutions}}","conditions":[],"children":[],"schemaVersion":1,"connectionId":null,"checksum":null}],"schemaVersion":1,"connectionId":null,"checksum":null},{"id":"a59dd892-d09a-48b2-8877-a24d545720ec","parentId":null,"conditionParentId":null,"component":"ACTION","type":"jira.issue.comment","value":{"comment":"[~{{initiator.accountId}}] Clone complete: {{createdIssue.key}}","publicComment":false,"commentVisibility":null,"sendNotifications":true,"addCommentOnce":false},"conditions":[],"children":[],"schemaVersion":2,"connectionId":null,"checksum":null}],"canOtherRuleTrigger":false,"notifyOnError":"FIRSTERROR","projects":[],"labels":[],"tags":[{"id":132955783,"ruleIdUuid":"019ffa46-ac5f-7cc8-843e-1061b7480891","tagType":"IS_RULE_UPDATED","tagValue":"true"}],"ruleScope":{"resources":["ari:cloud:jira:272fa231-d778-4aae-8a62-f241fefea1db:project/10017"]},"ruleHome":{"ruleLifecycleHome":{"locationARI":"ari:cloud:jira:272fa231-d778-4aae-8a62-f241fefea1db:project/10017"},"ruleBillingHome":{"locationARI":"ari:cloud:jira-software::site/272fa231-d778-4aae-8a62-f241fefea1db"}},"writeAccessType":"OWNER_ONLY","collaborators":[],"billingType":"NORMAL","idUuid":"019ffa46-ac5f-7cc8-843e-1061b7480891","partitionId":"31f2ea31-ed11-463e-aef7-b0b01742aae3","checksum":{"version":3,"value":"2f57afedd178780ea588063335f7523c8d4c11e12ad39f0e251db36d3bf2d466"},"currentVersionId":null,"editRestrictions":null,"ruleArchetype":null}]}