[PR #1836] [MERGED] Fix self-assignment notification to use "themselves" instead of repeating username #3725

Closed
opened 2026-03-22 14:52:19 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-vikunja/vikunja/pull/1836
Author: @Copilot
Created: 11/17/2025
Status: Merged
Merged: 11/17/2025
Merged by: @kolaente

Base: mainHead: copilot/fix-task-assignment-notification


📝 Commits (3)

  • cde2f32 Initial plan
  • 31cd393 feat: improve notification message for self-assigned tasks
  • e737d3d chore: remove translations from non-English language files

📊 Changes

2 files changed (+11 additions, -1 deletions)

View changed files

📝 pkg/i18n/lang/en.json (+3 -1)
📝 pkg/models/notifications.go (+8 -0)

📄 Description

When a user assigns a task to themselves, notifications to other subscribers currently say "User A assigned Task #123 to User A" instead of the more natural "User A assigned Task #123 to themselves".

Changes

  • Notification logic (pkg/models/notifications.go): Added check for Doer.ID == Assignee.ID to detect self-assignment and route to appropriate message template
  • Translations: Added notifications.task.assigned.{subject,message}_to_others_self keys to English language file only (other languages will be added automatically by CI)

Example

Before:

Alice assigned "Fix bug" (#123) to Alice

After:

Alice assigned "Fix bug" (#123) to themselves

Note: The assignee still receives "You have been assigned to [Task] by [Doer]" as before. Only notifications to other subscribers are affected.

Original prompt

When a user assignes a task to themselves, the notification should be "User A assigned Task #123 to themselves", not "User A assigned Task #123 to User A"


Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-vikunja/vikunja/pull/1836 **Author:** [@Copilot](https://github.com/apps/copilot-swe-agent) **Created:** 11/17/2025 **Status:** ✅ Merged **Merged:** 11/17/2025 **Merged by:** [@kolaente](https://github.com/kolaente) **Base:** `main` ← **Head:** `copilot/fix-task-assignment-notification` --- ### 📝 Commits (3) - [`cde2f32`](https://github.com/go-vikunja/vikunja/commit/cde2f32da5e62042c3c9858eee7dd0c4cc013eb2) Initial plan - [`31cd393`](https://github.com/go-vikunja/vikunja/commit/31cd3930b73c55fc657575baf5d6e8952c3f7a2e) feat: improve notification message for self-assigned tasks - [`e737d3d`](https://github.com/go-vikunja/vikunja/commit/e737d3d6173a45cac8f4ed3531fedca232bd3185) chore: remove translations from non-English language files ### 📊 Changes **2 files changed** (+11 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `pkg/i18n/lang/en.json` (+3 -1) 📝 `pkg/models/notifications.go` (+8 -0) </details> ### 📄 Description When a user assigns a task to themselves, notifications to other subscribers currently say "User A assigned Task #123 to User A" instead of the more natural "User A assigned Task #123 to themselves". **Changes** - **Notification logic** (`pkg/models/notifications.go`): Added check for `Doer.ID == Assignee.ID` to detect self-assignment and route to appropriate message template - **Translations**: Added `notifications.task.assigned.{subject,message}_to_others_self` keys to English language file only (other languages will be added automatically by CI) **Example** Before: ``` Alice assigned "Fix bug" (#123) to Alice ``` After: ``` Alice assigned "Fix bug" (#123) to themselves ``` Note: The assignee still receives "You have been assigned to [Task] by [Doer]" as before. Only notifications to other subscribers are affected. <!-- START COPILOT CODING AGENT SUFFIX --> <details> <summary>Original prompt</summary> > When a user assignes a task to themselves, the notification should be "User A assigned Task #123 to themselves", not "User A assigned Task #123 to User A" </details> <!-- START COPILOT CODING AGENT TIPS --> --- ✨ Let Copilot coding agent [set things up for you](https://github.com/go-vikunja/vikunja/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-22 14:52:19 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#3725