-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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
fix: Added check if count is truthy on cleanRoomHistory
#28081
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #28081 +/- ##
===========================================
- Coverage 46.86% 40.98% -5.89%
===========================================
Files 707 688 -19
Lines 13241 13022 -219
Branches 2221 2182 -39
===========================================
- Hits 6206 5337 -869
- Misses 6720 7398 +678
+ Partials 315 287 -28
Flags with carried forward coverage won't be shown. Click here to find out more. |
while I don't have to time this properly, what do you think about creating some tests? it doesn't need to use the scheduled "history clean" that you need to wait some minutes for it to run, you can trigger the "history clean" manually and assert the room data has not changed. |
@sampaiodiego sure, I can do that |
cleanRoomHistory
cleanRoomHistory
🦋 Changeset detectedLatest commit: 3733d6b The changes in this PR will be included in the next version bump. This PR includes changesets to release 24 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 |
cleanRoomHistory
cleanRoomHistory
…ove/mentions * 'develop' of github.com:RocketChat/Rocket.Chat: (48 commits) fix: Changed contact form async validations to onSubmit (#29250) refactor: Omnichannel Department re-write (#28948) feat: Added attachments to contact history message list (#29336) fix: Clicking uploaded file title replaces current tab (#29174) fix: broken error messages on room.saveInfo & missing CF validations on omni/contact api (#28367) regression: Missing loading indicator (#29374) fix: Added check if count is truthy on `cleanRoomHistory` (#28081) chore: small tricks with keys and invalidations with marketplace page (#29369) fix: Missing await on agent leave action (#29358) refactor: useQuery for Marketplace Lists (#29348) test: add missing omnichannel contact-center tests (#28989) ci: omit vite log (#29360) chore: update `status-warning-2` color (#29321) fix: File upload in Safari, IOS devices (#27121) chore: update status-bullet colors (#29316) chore: `Contextualbar` empty state consistency (#29341) chore(deps-dev): Bump @storybook/source-loader from 6.5.15 to 6.5.16 (#27866) feat(apps): Disabling apps on trial license expiration (#29037) chore(deps-dev): Bump @storybook/manager-webpack4 from 6.5.15 to 6.5.16 (#27865) chore(deps-dev): Bump @storybook/addon-actions from 6.5.15 to 6.5.16 (#27917) ...
…memberList * 'develop' of github.com:RocketChat/Rocket.Chat: (30 commits) fix: Changed contact form async validations to onSubmit (#29250) refactor: Omnichannel Department re-write (#28948) feat: Added attachments to contact history message list (#29336) fix: Clicking uploaded file title replaces current tab (#29174) fix: broken error messages on room.saveInfo & missing CF validations on omni/contact api (#28367) regression: Missing loading indicator (#29374) fix: Added check if count is truthy on `cleanRoomHistory` (#28081) chore: small tricks with keys and invalidations with marketplace page (#29369) fix: Missing await on agent leave action (#29358) refactor: useQuery for Marketplace Lists (#29348) test: add missing omnichannel contact-center tests (#28989) ci: omit vite log (#29360) chore: update `status-warning-2` color (#29321) fix: File upload in Safari, IOS devices (#27121) chore: update status-bullet colors (#29316) chore: `Contextualbar` empty state consistency (#29341) chore(deps-dev): Bump @storybook/source-loader from 6.5.15 to 6.5.16 (#27866) feat(apps): Disabling apps on trial license expiration (#29037) chore(deps-dev): Bump @storybook/manager-webpack4 from 6.5.15 to 6.5.16 (#27865) chore(deps-dev): Bump @storybook/addon-actions from 6.5.15 to 6.5.16 (#27917) ...
Co-authored-by: Matheus Barbosa Silva <36537004+matheusbsilva137@users.noreply.github.com>
Proposed changes (including videos or screenshots)
This PR adds a check when the room is updated inside the function
removeByIdPinnedTimestampLimitAndUsers
which is called oncleanRoomHistory
; It has been added because even when the room wasn't being updated, the_updatedAt
was changed, and caused move chats to the top of the list even when nothing has changed there.Issue(s)
#27956
Steps to test or reproduce
Retention Policy
.*/5 * * * *
_updatedAt
value has changed in each room:db.rocketchat_room.find({ }, {"_updatedAt": 1 }).pretty()
Further comments
TC-488