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

Regression: Fix Omnichannel not working after meteor update #26194

Merged
merged 4 commits into from
Jul 12, 2022

Conversation

KevLehman
Copy link
Contributor

Proposed changes (including videos or screenshots)

Fixed things:

  • Omnichannel Directory
  • Omnichannel Current Chats
  • Auto Selection Algo
  • Load Balance Algo
  • Manual Selection Algo
  • Livechat New Conversations

Other fixed things:

  • Warning on fields deprecation
  • Warning on "remove" deprecation
  • Remove findAndModify usage

Issue(s)

Steps to test or reproduce

Further comments

@@ -37,7 +38,7 @@ export class LivechatRooms extends Base {

findLivechat(filter = {}, offset = 0, limit = 20) {
const query = Object.assign(filter, { t: 'l' });
return this.find(query, { sort: { ts: -1 }, offset, limit });
return this.findPaginated(query, { sort: { ts: -1 }, offset, limit });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think there is a findPaginated in Base class.. I actually moved all queries that needed to use findPaginated to raw model

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird, this worked 🤔 let me change


import { Base } from './_Base';
import Rooms from './Rooms';
import Settings from './Settings';
// import Settings from './Settings';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// import Settings from './Settings';

@@ -188,7 +184,7 @@ export class LivechatDepartmentAgents extends Base {
},
};

const bot = this.findAndModify(query, sort, update);
const bot = this.findOneAndUpdate(query, update, { sort, returnNewDocument: 'after' });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should use rawCollection() or this method/operation should be moved to a raw model


return livechatCount.value.value;
const livechatCount = await Settings.findOneAndUpdate(query, update, { returnDocument: 'after' });
return livechatCount.value;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the correct return value here should be the same as before.. but since the return is not used right now, it doesn't break anything 😬

Suggested change
return livechatCount.value;
return livechatCount.value.value;

@KevLehman KevLehman added this to the 5.0.0 milestone Jul 11, 2022
@ggazzo ggazzo added stat: ready to merge PR tested and approved waiting for merge and removed stat: needs QA labels Jul 11, 2022
@sampaiodiego sampaiodiego merged commit 62d77d8 into develop Jul 12, 2022
@sampaiodiego sampaiodiego deleted the regression/omnichannel-broken-functions branch July 12, 2022 02:39
gabriellsh added a commit that referenced this pull request Jul 12, 2022
…jumpMessage

* 'develop' of github.com:RocketChat/Rocket.Chat: (27 commits)
  Chore: Remove unused migrations (#26102)
  Regression: Fix files list endpoints (#26226)
  Regression: Fix Omnichannel not working after meteor update (#26194)
  Regression: Empty URL previews in messages. (#26160)
  Regression: OTR with new React Messages (#26179)
  Regression: Replace contact center icon (#26216)
  Regression: Fix rendered markdown styling on app info page details section (#26093)
  [BREAK] Remove webRTC for channels/dm/groups (#26225)
  Regression: Meteor uses projection for its observes (#26223)
  Chore: Do not log integrations using `name` key (#26163)
  Chore: Check for env var values and not just if they are set (#26219)
  Regression: UIKit buttons auth user validation (#26171)
  Regression: Cannot logout when CallProvider is unregistered and mounted (#26158)
  Regression: Change Audio settings for device settings as modal title (#26159)
  Regression: Inline code and copyonly tag styles (#26173)
  Regression: remove italic from reaction translation (#26152)
  Regression: Reverting @rocket.chat/mp3-encoder version to fix Audio Message (#26197)
  Chore: Info page (#26201)
  Regression: Fix command previews (#26199)
  Change Apps-Engine version source for info (#26205)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat: QA tested stat: ready to merge PR tested and approved waiting for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants