Extract collaborators#9217
Merged
Merged
Conversation
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
|
Connected to Huly®: UBERF-11469 |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR standardizes how collaborators are extracted by replacing the old notification.mixin.ClassCollaborators mixins with a dedicated ClassCollaborators document type across all models, updates imports accordingly, and adds migration logic to materialize collaborator records into their own collection.
- Replace
builder.mixin(..., notification.mixin.ClassCollaborators, …)withbuilder.createDoc<ClassCollaborators<…>>(core.class.ClassCollaborators, core.space.Model, { attachedTo, fields, … })in all model modules. - Update imports in each module to include
type ClassCollaboratorsand related core types. - Extend the notification plugin—register new collaborator viewlets and update migration scripts to extract existing collaborator mixins into standalone
Collaboratordocs; bump version.
Reviewed Changes
Copilot reviewed 53 out of 53 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| models/training/src/index.ts | Use createDoc for ClassCollaborators on TrainingRequest |
| models/tracker/src/index.ts | Use createDoc for ClassCollaborators on Issue |
| models/time/src/index.ts | Use createDoc for ClassCollaborators on ToDo |
| models/setting/src/index.ts | Use createDoc for ClassCollaborators on Integration |
| models/request/src/index.ts | Use createDoc for ClassCollaborators on Request |
| models/recruit/src/index.ts | Use createDoc for ClassCollaborators on Vacancy and Applicant |
| models/notification/src/plugin.ts | Update registered viewlets & remove old TClassCollaborators mixin |
| models/notification/src/migration.ts | Add migrateCollaborators and enhance migrateAccounts |
| models/notification/src/index.ts | Refactor TCollaborators props, imports, and plugin exports |
| models/love/src/index.ts | Use createDoc for ClassCollaborators on MeetingMinutes and add account field |
| models/lead/src/index.ts | Use createDoc for ClassCollaborators on Lead |
| models/document/src/index.ts | Use createDoc for ClassCollaborators on Document |
| models/core/src/index.ts | Register TClassCollaborators & TCollaborator in core model |
| models/core/src/core.ts | Define TClassCollaborators and TCollaborator classes |
| models/controlled-documents/src/index.ts | Use createDoc for ClassCollaborators on ControlledDocument |
| models/contact/src/index.ts | Use createDoc for ClassCollaborators on Contact and Channel |
| models/chunter/src/notifications.ts | Use createDoc for ClassCollaborators on DirectMessage and Channel |
| models/calendar/src/index.ts | Use createDoc for ClassCollaborators on Event |
| models/activity/src/notification.ts | Use createDoc for ClassCollaborators on ActivityMessage and DocUpdateMessage |
| common/scripts/version.txt | Bump version from 0.7.136 to 0.7.139 |
Comments suppressed due to low confidence (1)
models/notification/src/plugin.ts:342
- The registration for
TClassCollaboratorswas removed frombuilder.createModel. Without it, theClassCollaboratorsdocument type won’t be recognized at runtime. Please re-addTClassCollaboratorsalongsideTCollaborators.
TCollaborators,
haiodo
reviewed
Jun 13, 2025
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
haiodo
approved these changes
Jun 20, 2025
RoadRoller
pushed a commit
to RoadRoller/platform
that referenced
this pull request
Jun 23, 2025
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com> Signed-off-by: roadroller <tarasenko@nprog.ru>
rostislavnagimov
pushed a commit
to rostislavnagimov/platform
that referenced
this pull request
Jun 30, 2025
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com> Signed-off-by: Rostislav Nagimov <rostislav.nagimov@gmail.com>
MichaelUray
pushed a commit
to MichaelUray/huly-platform
that referenced
this pull request
Jul 9, 2026
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
MichaelUray
added a commit
to MichaelUray/huly-platform
that referenced
this pull request
Jul 11, 2026
…tor txes The grant branch deduped only against committed Collaborator records. It now also scans Collaborator create transactions already queued in this trigger run whose attachedTo === grantTarget._id, and updates the dedup set in-loop. This fixes a real duplicate today: in the create path collaboratorsFromMessage appends the author, so a self-mention yielded two identical Collaborator txes. The in-flight scan additionally future-proofs the branch against a fixed seed path (see the regression guard in the added test); the seed-target mismatch itself is pre-existing (hcengineering#9217) and out of scope here. applyMentionGrants gets the same set discipline (its residual case is one person mentioned twice within an edit). Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com>
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.
No description provided.