fix: dispatch notifications for comment, link, and delete endpoints in the external API#9448
Open
stella-nova wants to merge 1 commit into
Conversation
…nts in external API Comment create/update/delete, link create/update/delete, and work item delete through the external REST API (/api/v1/...) created activities but never notified assignees and subscribers - issue_activity was dispatched without notification=True (defaults to False), so notifications.delay() never ran. The web app views pass notification=True and origin for the same actions. Pass notification=True and origin=base_host(request=request, is_app=True) on these seven issue_activity.delay() calls, mirroring the web app views and the attachment/relation endpoints in the same file. Complements makeplane#9307, which fixed issue create/update. Covers makeplane#7846. Contract tests added following test_issue_notifications.py conventions.
stella-nova
requested review from
dheeru0198 and
pablohashescobar
as code owners
July 20, 2026 19:29
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughChangesREST issue, comment, and link mutation endpoints now pass REST activity notifications
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Comment create/update/delete, link create/update/delete, and work item delete through the external REST API (
/api/v1/...) create activities but never notify assignees and subscribers — neither in-app nor by email.issue_activityis dispatched withoutnotification=True(the parameter defaults toFalseinapps/api/plane/bgtasks/issue_activities_task.py), sonotifications.delay(...)never runs. The web app views (apps/api/plane/app/views/issue/base.py,comment.py,link.py) passnotification=Trueandoriginfor the same actions, and in the same external API file the attachment and relation endpoints already pass it.This PR passes
notification=Trueandorigin=base_host(request=request, is_app=True)on the remaining sevenissue_activity.delay(...)calls inapps/api/plane/api/views/issue.py(comment create/update/delete, link create/update/delete, work item delete), mirroring the web app views. It complements #9307, which fixed issue create/update in the same file.Type of Change
Test Scenarios
Contract tests added to
plane/tests/contract/api/test_issue_notifications.pyfollowing the conventions introduced there: one test per endpoint asserting that the dispatched activity carriesnotification=True(7 new tests). Ran the full file against PostgreSQL/Redis/RabbitMQ services: 10 passed. Verified red/green: on the unpatched views exactly the 7 new tests fail.ruff checkclean.Also verified end-to-end on a self-hosted v1.3.1 instance carrying this change as a patch: an API-token comment on a subscribed work item produces the in-app notification, the email notification log entry, and the batched email.
References
Covers #7846. Complements #9306 / #9307.
Summary by CodeRabbit
New Features
Tests