diff --git a/api/Application.class.php b/api/Application.class.php index 520f8f0bc2..5c32f909db 100644 --- a/api/Application.class.php +++ b/api/Application.class.php @@ -661,6 +661,7 @@ static function initBundledResources($force=false) { 'cerb.login.terms_of_use', 'cerb.notifications.mention_emailer', 'cerb.quickstart', + 'cerb.records.reminders', 'cerb.satisfaction.surveys', 'cerb.search.simple', 'cerb.sla', diff --git a/features/cerberusweb.core/api/dao/workflow.php b/features/cerberusweb.core/api/dao/workflow.php index 18d2cbca86..7d4d5388c7 100644 --- a/features/cerberusweb.core/api/dao/workflow.php +++ b/features/cerberusweb.core/api/dao/workflow.php @@ -2028,6 +2028,11 @@ function renderPeekPopup($context_id=0, $view_id='', $edit=false) { 'name' => 'Quickstart Checklist', 'description' => 'A workspace with a quickstart checklist for initial configuration of Cerb', ], + 'cerb.records.reminders' => [ + 'id' => 'cerb.records.reminders', + 'name' => 'Record Reminders', + 'description' => 'Create reminders from record profiles and cards', + ], 'cerb.email.org_by_hostname' => [ 'id' => 'cerb.email.org_by_hostname', 'name' => 'Sender Org By Hostname', diff --git a/features/cerberusweb.core/api/uri/profiles/workflow.php b/features/cerberusweb.core/api/uri/profiles/workflow.php index 4dd50c6a6f..ce56baa387 100644 --- a/features/cerberusweb.core/api/uri/profiles/workflow.php +++ b/features/cerberusweb.core/api/uri/profiles/workflow.php @@ -148,6 +148,7 @@ private function _profileAction_savePeekJson() { 'cerb.login.terms_of_use', 'cerb.notifications.mention_emailer', 'cerb.quickstart', + 'cerb.records.reminders', 'cerb.satisfaction.surveys', 'cerb.search.simple', 'cerb.sla', @@ -487,6 +488,7 @@ private function _profileAction_showTemplateUpdatePopup() { 'cerb.login.terms_of_use' => file_get_contents(APP_PATH . '/features/cerberusweb.core/workflows/cerb.login.terms_of_use.kata'), 'cerb.notifications.mention_emailer' => file_get_contents(APP_PATH . '/features/cerberusweb.core/workflows/cerb.notifications.mention_emailer.kata'), 'cerb.quickstart' => file_get_contents(APP_PATH . '/features/cerberusweb.core/workflows/cerb.quickstart.kata'), + 'cerb.records.reminders' => file_get_contents(APP_PATH . '/features/cerberusweb.core/workflows/cerb.records.reminders.kata'), 'cerb.satisfaction.surveys' => file_get_contents(APP_PATH . '/features/cerberusweb.core/workflows/cerb.satisfaction.surveys.kata'), 'cerb.search.simple' => file_get_contents(APP_PATH . '/features/cerberusweb.core/workflows/cerb.search.simple.kata'), 'cerb.sla' => file_get_contents(APP_PATH . '/features/cerberusweb.core/workflows/cerb.sla.kata'), diff --git a/features/cerberusweb.core/workflows/cerb.records.reminders.kata b/features/cerberusweb.core/workflows/cerb.records.reminders.kata new file mode 100644 index 0000000000..f31b21d7e8 --- /dev/null +++ b/features/cerberusweb.core/workflows/cerb.records.reminders.kata @@ -0,0 +1,100 @@ +workflow: + name: cerb.records.reminders + description: Create reminders from record profiles and cards + website: https://cerb.ai/workflows/cerb.records.reminders/ + requirements: + cerb_version: >=11.0 <11.1 + cerb_plugins: cerberusweb.core + version: 2025-01-13T23:21:57Z +records: + automation/workerInteraction: + fields: + name: cerb.records.reminders.interaction + extension_id: cerb.trigger.interaction.worker + description@text: + script@raw: + inputs: + text/record_type: + type: freeform + required@bool: yes + text/record_id: + type: number + required@bool: yes + + start: + set/load: + record_id@int: {{inputs.record_id}} + record__context: {{inputs.record_type}} + + await/input: + form: + title: Create Reminder + elements: + text/prompt_name: + label: Reminder: + required@bool: yes + type: freeform + default: {{record__label}} + placeholder: (e.g. "Remind me to write back") + text/prompt_due: + label: When: + type: date + required@bool: yes + chooser/prompt_owner_id: + label: Who: + record_type: worker + query@text: isDisabled:n + default: {{worker_id}} + required@bool: yes + + record.create/reminder: + output: new_reminder + inputs@ref: + record_type: reminder + fields: + name: {{prompt_name}} + remind_at@date: {{prompt_due}} + worker_id@optional,int: {{prompt_owner_id}} + links@csv: {{record__context}}:{{record_id}} + + return: + alert: Reminder created! + policy_kata@raw: + commands: + record.create: + deny/type@bool: {{inputs.record_type is not record type ('reminder')}} + allow@bool: yes + toolbar_section/recordProfile: + fields: + name: Reminders + toolbar_name: record.profile + priority@int: 50 + is_disabled: 0 + toolbar_kata@raw: + interaction/reminder: + label: Reminder + uri: cerb:automation:cerb.records.reminders.interaction + icon: pushpin + inputs: + record_type: {{record__context}} + record_id: {{record_id}} + after: + refresh_toolbar@bool: no + refresh_widgets@list: Ticket + toolbar_section/recordCard: + fields: + name: Reminders + toolbar_name: record.card + priority@int: 50 + is_disabled: 0 + toolbar_kata@raw: + interaction/reminder: + label: Reminder + uri: cerb:automation:cerb.records.reminders.interaction + icon: pushpin + inputs: + record_type: {{record__context}} + record_id: {{record_id}} + after: + refresh_toolbar@bool: no + refresh_widgets@list: Properties \ No newline at end of file