-
Notifications
You must be signed in to change notification settings - Fork 11k
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
feat: Allow managing association to business units on departments' creation and update #32682
Conversation
Looks like this PR is ready to merge! 🎉 |
🦋 Changeset detectedLatest commit: e625cb2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 32 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
…nto improve/monitors-manage-departments-units
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #32682 +/- ##
===========================================
+ Coverage 59.74% 59.84% +0.09%
===========================================
Files 2552 2554 +2
Lines 62869 63020 +151
Branches 14123 14133 +10
===========================================
+ Hits 37562 37713 +151
Misses 22900 22900
Partials 2407 2407
Flags with carried forward coverage won't be shown. Click here to find out more. |
apps/meteor/ee/app/livechat-enterprise/server/hooks/manageDepartmentUnit.ts
Outdated
Show resolved
Hide resolved
This PR currently has a merge conflict. Please resolve this and then re-add the |
…nto improve/monitors-manage-departments-units
|
…eation and update (#32682)
…hAvatarById * 'develop' of github.com:RocketChat/Rocket.Chat: feat: Implement proper accessbility for report user modal (#33294) chore: update E2EE setting text (#33226) fix: conference calls are shown as "not answered" after they end (#33179) fix: markdown inconsistency with bold and italics (#33157) feat: E2EE messages mentions (#32510) refactor: Reactions set/unset (#32994) ci: auto candidate releases (#33325) feat: `RoomSidepanel` (#33225) feat: contextualbar based on chat size (#33321) fix: error on sendmessage stub (#33317) fix: `LivechatSessionTaken` webhook event called without `agent` param (#33209) refactor: Remove old `setreaction` callbacks and use new after/before callbacks (#33309) fix: Mark as unread not working (#32939) fix: Local avatars prioritized over external avatar provider and remove remnant references on client of `Accounts_AvatarExternalProviderUrl` (#33296) feat: Allow managing association to business units on departments' creation and update (#32682)
* Bump 6.12.1 * fix: message parser being slow to process very long messages with too many symbols (#33254) Co-authored-by: Pierre Lehnen <[email protected]> * fix: Allow to use the token from `room.v` when requesting transcript instead of finding visitor (#33242) Co-authored-by: Kevin Aleman <[email protected]> * fix: Retention Policy cached settings not updated during upgrade procedure (#33265) Co-authored-by: gabriellsh <[email protected]> * fix: imported fixes (#33268) Co-authored-by: Julio A. <[email protected]> * Release 6.12.1 [no ci] * fix: Federation callback not awaiting model call (#33298) * fix: correct parameter order in afterSaveMessage to restore outgoing webhooks and related features (#33295) * feat: New endpoint for listing rooms & discussions from teams (#33177) * chore: Update typings on callbacks to accept less than a full room object (#33305) * fix: resolve avatar download issue on setUsername by refining service selection logic (#33193) * feat: Allow managing association to business units on departments' creation and update (#32682) * fix: Local avatars prioritized over external avatar provider and remove remnant references on client of `Accounts_AvatarExternalProviderUrl` (#33296) Co-authored-by: gabriellsh <[email protected]> * fix: Mark as unread not working (#32939) Co-authored-by: Douglas Fabris <[email protected]> * refactor: Remove old `setreaction` callbacks and use new after/before callbacks (#33309) * fix: `LivechatSessionTaken` webhook event called without `agent` param (#33209) * fix: error on sendmessage stub (#33317) * feat: contextualbar based on chat size (#33321) * feat: `RoomSidepanel` (#33225) Co-authored-by: Guilherme Gazzo <[email protected]> * ci: auto candidate releases (#33325) Co-authored-by: Diego Sampaio <[email protected]> * refactor: Reactions set/unset (#32994) * feat: E2EE messages mentions (#32510) * fix: markdown inconsistency with bold and italics (#33157) * fix: conference calls are shown as "not answered" after they end (#33179) * Release 6.13.0-rc.0 * chore: update E2EE setting text (#33226) * feat: Implement proper accessbility for report user modal (#33294) Co-authored-by: Tasso Evangelista <[email protected]> * fix: imported fixes (#33330) * chore: create network broker package (#33338) * feat: Adds new admin feature preview setting management (#33212) Co-authored-by: Guilherme Gazzo <[email protected]> * chore: move common files to core-services (#33341) * regression: `Sidepanel` color highlight (#33342) * feat: Adds new admin feature preview setting management (#33212) Co-authored-by: Guilherme Gazzo <[email protected]> * fix: Avoid destructuring `connectionData` when value is undefined (#33339) * Release 6.13.0-rc.1 [no ci] * chore: replace Meteor._localStorage -> Accounts.storageLocation (#33356) * Bump rocket.chat to 6.14.0-develop (#33366) * ci: use node20 for release action (#33343) --------- Co-authored-by: rocketchat-github-ci <[email protected]> Co-authored-by: dionisio-bot[bot] <117394943+dionisio-bot[bot]@users.noreply.github.com> Co-authored-by: Pierre Lehnen <[email protected]> Co-authored-by: Kevin Aleman <[email protected]> Co-authored-by: gabriellsh <[email protected]> Co-authored-by: Julio A. <[email protected]> Co-authored-by: Guilherme Gazzo <[email protected]> Co-authored-by: Kevin Aleman <[email protected]> Co-authored-by: Ricardo Garim <[email protected]> Co-authored-by: Matheus Barbosa Silva <[email protected]> Co-authored-by: Tasso Evangelista <[email protected]> Co-authored-by: Martin Schoeler <[email protected]> Co-authored-by: Douglas Fabris <[email protected]> Co-authored-by: Júlia Jaeger Foresti <[email protected]> Co-authored-by: Guilherme Gazzo <[email protected]> Co-authored-by: Diego Sampaio <[email protected]> Co-authored-by: Hugo Costa <[email protected]> Co-authored-by: csuadev <[email protected]> Co-authored-by: Henrique Guimarães Ribeiro <[email protected]> Co-authored-by: Tasso Evangelista <[email protected]> Co-authored-by: Lucas Pelegrino <[email protected]> Co-authored-by: Trivikram Kamat <[email protected]>
…eation and update (#32682)
Proposed changes (including videos or screenshots)
departmentUnit
object param tolivechat:saveDepartment
Meteor method,livechat/department
(POST) endpoint andlivechat/department
(PUT) endpoint;{}
) to this param removes the department from its associated unit (or just doesn't add the department to any unit, if provided on the creation of a new department). Providing{ _id: undefined }
ornull
triggers the same effect;_id
field in the object ({ _id: "unit-id" }
), the department will be associated to the unit with the specified_id
IF the user has the permission to do so.manage-livechat-departments
permission (this is already the current behavior), but there are additional conditions to associate a department with a specific unit when the new param is provided:livechat-monitor
), then they must be a supervisor of the specified unit. That is, they must be linked (as monitor) to the specified unit in order to add or remove departments from it;admin
orlivechat-manager
), any unit can be associated to the department (on creation or update)._id
field to the new param's object will trigger an error.Issue(s)
Steps to test or reproduce
Example request to the
livechat:saveDepartment
method (the new param is the last one that should be provided --{\"_id\":\"unit-id\"}
in the example):The command above triggers the creation of a new department associated with the unit with id
unit-id
. Change the firstnull
param to a validdepartment
string to edit it.Example request to the
livechat/department
POST endpoint (check the newdepartmentUnit
param):Example request to the
livechat/department/:id
PUT endpoint (check the newdepartmentUnit
param -- providing an empty object to it will remove the department from its associated unit):Further comments
SUP-613