You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature: Add configurable defaults for new tickets
- Add client.new_ticket_template for prefilling new tickets
- Support default cc, notify, and due values for tickets
- Allow ticket actions to set relative due dates like "3 days"
- Add due date presets to ticket creation dialogs and action config
- Normalize relative due dates when creating tickets via API/actions
- Document ticket_due and the new ticket template config
- Reordered "New Ticket" sidebar shortcut.
|`ticket_assignees`| Array(String) | Yes | Array of [User.username](data.md#user-username) assignees. |
334
334
|`ticket_tags`| Array(String) | Optional | Array of [Tag.id](data.md#tag-id) values. |
335
+
|`ticket_due`| String or Number | Optional | Due date for the new ticket. This may be an absolute Unix epoch time, or a relative date delta such as `1 day`, `3 days`, or `1d`. |
335
336
336
337
Example (job error):
337
338
338
339
```json
339
340
{
340
-
"enabled": true,
341
-
"condition": "error",
342
-
"type": "ticket",
343
-
"ticket_type": "issue",
344
-
"ticket_assignees": ["oncall"],
345
-
"ticket_tags": ["production", "sev2"]
341
+
"enabled": true,
342
+
"condition": "error",
343
+
"type": "ticket",
344
+
"ticket_type": "issue",
345
+
"ticket_assignees": ["oncall"],
346
+
"ticket_tags": ["production", "sev2"],
347
+
"ticket_due": "3 days"
346
348
}
347
349
```
348
350
349
351
Example (alert cleared):
350
352
351
353
```json
352
354
{
353
-
"enabled": true,
354
-
"condition": "alert_cleared",
355
-
"type": "ticket",
356
-
"ticket_type": "task",
357
-
"ticket_assignees": ["sre"],
358
-
"ticket_tags": ["cleanup"]
355
+
"enabled": true,
356
+
"condition": "alert_cleared",
357
+
"type": "ticket",
358
+
"ticket_type": "task",
359
+
"ticket_assignees": ["sre"],
360
+
"ticket_tags": ["cleanup"],
361
+
"ticket_due": "1 day"
359
362
}
360
363
```
361
364
362
-
See [Tickets](tickets.md) for more details on tickets.
365
+
See [Tickets](tickets.md) for more details on tickets, including the [New Ticket Template](tickets.md#new-ticket-template), which can provide default `cc`, `notify`, and `due` values.
Copy file name to clipboardExpand all lines: docs/data.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2908,7 +2908,7 @@ Each action has a `type` property which dictates what will happen when the condi
2908
2908
|`tag`| Add one or more [Tags](tags.md) to the running job or workflow. |
2909
2909
|`store`| Store data in a storage bucket. Requires `bucket_id` (the [Bucket.id](#bucket-id)), `bucket_sync` (species if files and/or data should be stored), and `bucket_glob` (glob pattern to match on files). |
2910
2910
|`fetch`| Fetch data from a storage bucket. Requires `bucket_id` (the [Bucket.id](#bucket-id)), `bucket_sync` (species if files and/or data should be fetched), and `bucket_glob` (glob pattern to match on files). |
2911
-
|`ticket`| Create a ticket. Requires `ticket_type` (see [Ticket.type](#ticket-type)), `ticket_assignees` (an array of [User.username](#user-username)s), and `ticket_tags` (an array of [Tag.id](#tag-id)s). |
2911
+
|`ticket`| Create a ticket. Requires `ticket_type` (see [Ticket.type](#ticket-type)), `ticket_assignees` (an array of [User.username](#user-username)s), and `ticket_tags` (an array of [Tag.id](#tag-id)s). Can also include `ticket_due`, as an absolute Unix epoch time or a relative date delta such as `3 days`. |
2912
2912
|`plugin`| Invoke a custom Plugin for the action. Requires `plugin_id` (the [Plugin.id](#plugin-id)) and `params` (custom parameters defined by the Plugin). |
Copy file name to clipboardExpand all lines: docs/tickets.md
+58Lines changed: 58 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,12 +55,69 @@ Related APIs:
55
55
-[delete_ticket](api.md#delete_ticket): Permanently delete a ticket.
56
56
-[search_tickets](api.md#search_tickets): Search with pagination and sorting; supports compact mode for grids.
57
57
58
+
### New Ticket Template
59
+
60
+
You can set defaults for new tickets using the [client.new_ticket_template](config.md#client-new_ticket_template) configuration object. This is useful when your team wants every new ticket to start with common metadata, a standard due date, or a global notification list.
61
+
62
+
The template applies to tickets created manually in the UI, and parts of it are also used by tickets created from job and alert actions. Specifically, ticket actions inherit `cc`, `notify`, and `due` from the template, unless the action supplies its own due date.
63
+
64
+
Here is a simple example:
65
+
66
+
```json
67
+
"new_ticket_template": {
68
+
"type": "issue",
69
+
"status": "open",
70
+
"assignees": ["oncall"],
71
+
"cc": ["ops-manager"],
72
+
"notify": ["ops-team@company.com"],
73
+
"tags": ["production"],
74
+
"due": "3 days"
75
+
}
76
+
```
77
+
78
+
Common options include:
79
+
80
+
-`assignees`: Default list of user IDs assigned to manually-created tickets.
81
+
-`cc`: Default list of xyOps usernames who should receive ticket update emails.
82
+
-`notify`: Default list of custom email addresses that should receive ticket update emails.
83
+
-`tags`: Default list of tag IDs applied to manually-created tickets.
84
+
-`type`: Default ticket type, such as `issue`, `change`, or `maintenance`.
85
+
-`status`: Default ticket status, usually `open` or `draft`.
86
+
-`due`: Default due date. This may be an absolute Unix epoch time, or a relative date delta such as `"1 day"`, `"3 days"`, `"1 week"`, or `"1d"`.
87
+
88
+
For example, to copy an operations manager on all new tickets, set:
89
+
90
+
```json
91
+
"new_ticket_template": {
92
+
"cc": ["ops-manager"]
93
+
}
94
+
```
95
+
96
+
To send all ticket update emails to an outside mailing list, use `notify`:
97
+
98
+
```json
99
+
"new_ticket_template": {
100
+
"notify": ["ops-team@company.com"]
101
+
}
102
+
```
103
+
104
+
To make every new ticket due three days after it is created, set:
105
+
106
+
```json
107
+
"new_ticket_template": {
108
+
"due": "3 days"
109
+
}
110
+
```
111
+
112
+
When a ticket has a due date and remains open past that date, xyOps sends daily overdue reminder emails to ticket assignees. Ticket update emails still go to assignees, `cc` users, and `notify` email addresses.
113
+
58
114
### Job Action
59
115
60
116
Jobs can create tickets on start or completion based on outcome or tags. Add a "Create Ticket" action to an event, workflow node, or via category/universal defaults. When fired:
61
117
62
118
- The ticket body is auto-generated (template: job) with useful context (job details, performance, log excerpt, links).
63
119
- Category, tags, and server fields are auto-populated from the job when applicable.
120
+
- The ticket can inherit default `cc`, `notify`, and `due` values from `client.new_ticket_template`.
64
121
- The new ticket is added to the originating job for traceability.
65
122
66
123
See [Actions](actions.md) for action configuration.
@@ -71,6 +128,7 @@ Alerts can create tickets when an alert fires (or clears, if desired). Add a "Cr
71
128
72
129
- The ticket body is auto-generated (template: alert) with server and alert context, links to the alert and server, and optionally active job summaries.
73
130
- Server is populated from the firing server; tags can be set from the action.
131
+
- The ticket can inherit default `cc`, `notify`, and `due` values from `client.new_ticket_template`.
74
132
- The new ticket is added to the alert invocation record.
0 commit comments