Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix(#1217): task notifications #1219

Merged
merged 5 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
// generated by unplugin-vue-components
// We suggest you to commit this file into source control
// Read more: https://github.com/vuejs/core/pull/3399
import '@vue/runtime-core'

export {}

declare module '@vue/runtime-core' {
declare module 'vue' {
export interface GlobalComponents {
Menu: typeof import('./src/components/menu.vue')['default']
VApp: typeof import('vuetify/lib')['VApp']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ public void delegateTask(final DelegateTask delegateTask) throws Exception {
}
}
// send notification on task assignment for assignee
// assignment event is used for direct user assignment
// update event is used for group task assignment
else if (delegateTask.getEventName().equals("assignment")) {
// Create Event: User Task creation
// Assignment: e.g. a Group Task is assigend to the user later on
if (delegateTask.getEventName().equals("create") || delegateTask.getEventName().equals("assignment")) {
log.debug("Notification for created task: {}", delegateTask.getName());
val notify = NOTIFICATION_SEND.from(delegateTask).getOptional();
if (notify.isPresent()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ void testDelegateTask_WithAssignee() throws Exception {
"digitalwf_notification_send_candidate_users", "false",
"digitalwf_notification_send_candidate_groups", "false",
"app_task_assignee", this.user.getLhmObjectId()
), "assignment");
), "create");
when(task.getCandidates()).thenReturn(Collections.<IdentityLink>emptySet());

final Mail mail = this.notifyUsers(task, this.userTaskDefaultMailContent, 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void testDelegateTask_WithNotificationOff() throws Exception {
"app_notification_send_candidate_users", "false",
"app_notification_send_candidate_groups", "false",
"app_task_assignee", this.user.getLhmObjectId()
), "assignment");
), "create");
this.notifyUsers(task, null, 0);
}

Expand All @@ -79,7 +79,7 @@ void testDelegateTask_WithAssignee() throws Exception {
"app_notification_send_candidate_users", "false",
"app_notification_send_candidate_groups", "false",
"app_task_assignee", this.user.getLhmObjectId()
), "assignment");
), "create");
when(task.getCandidates()).thenReturn(Collections.<IdentityLink>emptySet());

final Mail mail = this.notifyUsers(task, this.userTaskDefaultMailContent, 1);
Expand Down Expand Up @@ -129,7 +129,7 @@ void testDelegateTask_WithCustomMailContentForUserTaskNotifications() throws Exc
"mail_body", "Email Body",
"mail_bottom_text", "Some Bottom Text",
"mail_subject", "Email Subject"
), "assignment");
), "create");
when(task.getCandidates()).thenReturn(Collections.<IdentityLink>emptySet());
final Map<String, String> customMailContent = Map.of(
"%%body_top%%", "Email Body",
Expand Down
Loading