Snippets

Daniel Eads Automation - Assign incoming issues based on custom field

Created by Daniel Eads last modified
{
	"rules": [
		{
			"id": 1456004,
			"clientKey": "",
			"name": "Assign incoming records",
			"state": "ENABLED",
			"description": null,
			"authorAccountId": "",
			"actor": {
				"type": "ACCOUNT_ID",
				"value": ""
			},
			"created": 1607635009987,
			"updated": 1607636548817,
			"trigger": {
				"id": "28987735",
				"component": "TRIGGER",
				"parentId": null,
				"conditionParentId": null,
				"schemaVersion": 1,
				"type": "jira.issue.event.trigger:created",
				"value": {
					"eventKey": "jira:issue_created",
					"issueEvent": "issue_created"
				},
				"children": [

				],
				"conditions": [

				]
			},
			"components": [
				{
					"id": "28987736",
					"component": "ACTION",
					"parentId": null,
					"conditionParentId": null,
					"schemaVersion": 1,
					"type": "jira.create.variable",
					"value": {
						"id": "_customsmartvalue_id_1607634833201",
						"name": {
							"type": "FREE",
							"value": "multi"
						},
						"type": "SMART",
						"query": {
							"type": "SMART",
							"value": "null"
						},
						"lazy": false
					},
					"children": [

					],
					"conditions": [

					]
				},
				{
					"id": "28987737",
					"component": "ACTION",
					"parentId": null,
					"conditionParentId": null,
					"schemaVersion": 1,
					"type": "jira.create.variable",
					"value": {
						"id": "_customsmartvalue_id_1607634853466",
						"name": {
							"type": "FREE",
							"value": "multiassignee"
						},
						"type": "SMART",
						"query": {
							"type": "SMART",
							"value": "null"
						},
						"lazy": false
					},
					"children": [

					],
					"conditions": [

					]
				},
				{
					"id": "28987738",
					"component": "CONDITION",
					"parentId": null,
					"conditionParentId": null,
					"schemaVersion": 1,
					"type": "jira.condition.container.block",
					"value": null,
					"children": [
						{
							"id": "28987739",
							"component": "CONDITION_BLOCK",
							"parentId": "28987738",
							"conditionParentId": null,
							"schemaVersion": 1,
							"type": "jira.condition.if.block",
							"value": {
								"conditionMatchType": "ALL"
							},
							"children": [
								{
									"id": "28987741",
									"component": "ACTION",
									"parentId": "28987739",
									"conditionParentId": null,
									"schemaVersion": 1,
									"type": "jira.create.variable",
									"value": {
										"id": "_customsmartvalue_id_1607632724816",
										"name": {
											"type": "FREE",
											"value": "multi"
										},
										"type": "SMART",
										"query": {
											"type": "SMART",
											"value": "{{issue.recordID.split(\"/\").first}}"
										},
										"lazy": false
									},
									"children": [

									],
									"conditions": [

									]
								},
								{
									"id": "28987742",
									"component": "ACTION",
									"parentId": "28987739",
									"conditionParentId": null,
									"schemaVersion": 1,
									"type": "jira.lookup.issues",
									"value": {
										"id": "_customsmartvalue_id_1607632925917",
										"name": {
											"type": "FREE",
											"value": "lookupIssues"
										},
										"type": "JQL",
										"query": {
											"type": "SMART",
											"value": "recordID ~ \"{{multi}}*\" and issuekey != {{issue.key}}"
										},
										"lazy": false
									},
									"children": [

									],
									"conditions": [

									]
								},
								{
									"id": "28987743",
									"component": "ACTION",
									"parentId": "28987739",
									"conditionParentId": null,
									"schemaVersion": 1,
									"type": "jira.create.variable",
									"value": {
										"id": "_customsmartvalue_id_1607634430063",
										"name": {
											"type": "FREE",
											"value": "multiassignee"
										},
										"type": "SMART",
										"query": {
											"type": "SMART",
											"value": "{{lookupIssues.assignee.first}}"
										},
										"lazy": false
									},
									"children": [

									],
									"conditions": [

									]
								}
							],
							"conditions": [
								{
									"id": "28987740",
									"component": "CONDITION",
									"parentId": null,
									"conditionParentId": "28987739",
									"schemaVersion": 1,
									"type": "jira.comparator.condition",
									"value": {
										"first": "{{recordID}}",
										"second": "/",
										"operator": "CONTAINS"
									},
									"children": [

									],
									"conditions": [

									]
								}
							]
						}
					],
					"conditions": [

					]
				},
				{
					"id": "28987744",
					"component": "CONDITION",
					"parentId": null,
					"conditionParentId": null,
					"schemaVersion": 1,
					"type": "jira.condition.container.block",
					"value": null,
					"children": [
						{
							"id": "28987745",
							"component": "CONDITION_BLOCK",
							"parentId": "28987744",
							"conditionParentId": null,
							"schemaVersion": 1,
							"type": "jira.condition.if.block",
							"value": {
								"conditionMatchType": "ALL"
							},
							"children": [
								{
									"id": "28987748",
									"component": "ACTION",
									"parentId": "28987745",
									"conditionParentId": null,
									"schemaVersion": 3,
									"type": "jira.issue.assign",
									"value": {
										"assignType": "SMART_VALUE",
										"smartValue": "{{multiassignee}}",
										"jql": null,
										"issueToCopy": null,
										"fieldToCopy": null,
										"listAssignMethod": null,
										"assignee": null,
										"restrictedToGroup": null,
										"group": null,
										"role": null,
										"excludedUsers": [

										],
										"userList": [

										]
									},
									"children": [

									],
									"conditions": [

									]
								}
							],
							"conditions": [
								{
									"id": "28987746",
									"component": "CONDITION",
									"parentId": null,
									"conditionParentId": "28987745",
									"schemaVersion": 1,
									"type": "jira.comparator.condition",
									"value": {
										"first": "{{multi}}",
										"second": "null",
										"operator": "NOT_EQUALS"
									},
									"children": [

									],
									"conditions": [

									]
								},
								{
									"id": "28987747",
									"component": "CONDITION",
									"parentId": null,
									"conditionParentId": "28987745",
									"schemaVersion": 1,
									"type": "jira.comparator.condition",
									"value": {
										"first": "{{multiassignee}}",
										"second": "",
										"operator": "NOT_EQUALS"
									},
									"children": [

									],
									"conditions": [

									]
								}
							]
						},
						{
							"id": "28987749",
							"component": "CONDITION_BLOCK",
							"parentId": "28987744",
							"conditionParentId": null,
							"schemaVersion": 1,
							"type": "jira.condition.if.block",
							"value": {
								"conditionMatchType": "ALL"
							},
							"children": [
								{
									"id": "28987750",
									"component": "ACTION",
									"parentId": "28987749",
									"conditionParentId": null,
									"schemaVersion": 3,
									"type": "jira.issue.assign",
									"value": {
										"assignType": "AUTOMATIC",
										"smartValue": null,
										"jql": null,
										"issueToCopy": null,
										"fieldToCopy": null,
										"listAssignMethod": null,
										"assignee": null,
										"restrictedToGroup": null,
										"group": null,
										"role": null,
										"excludedUsers": [

										],
										"userList": [

										]
									},
									"children": [

									],
									"conditions": [

									]
								}
							],
							"conditions": [

							]
						}
					],
					"conditions": [

					]
				}
			],
			"canOtherRuleTrigger": false,
			"notifyOnError": "FIRSTERROR",
			"projects": [
				{
					"projectId": "10037",
					"projectTypeKey": "software"
				}
			],
			"labels": [

			],
			"tags": [

			]
		}
	],
	"cloud": true
}

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.