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

fix: Discussion messages deleted despite the "Do not delete discussion messages" retention policy enabled #31113

Merged
merged 3 commits into from
Dec 4, 2023

Conversation

heitortanoue
Copy link
Contributor

Proposed changes (including videos or screenshots)

Discussion messages were being deleted despite the "Do not delete discussion messages" retention policy being enabled.

Altered the message deletion query to accurately respect the “Do not delete discussion messages” setting by excluding discussion rooms from the deletion process.

Issue(s)

Steps to test or reproduce

Prerequisite:

  • Have the setting Retention Policy enabledWorkspace → Retention Policy → Enabled
  • Have the global policy for “Do not prune discussion messages” enabledWorkspace → Retention Policy → Global Settings → Do not prune discussion messages → Enabled
  • Set the “Use Advanced Retention Policy Cron¨ to “/05***” so it’s set for five minutes
  • Enable the following options and set as “0”- Applies to channel

Steps to reproduce:

  • Open a channel
  • Create a discussion inside the channel and send a message
  • Send more messages in the discussion
  • Wait for the cron to run

Expected Behavior:
The discussion messages should be kept

Actual Behavior:

  • The messages inside the discussion are erased, except for the message that created the discussion.
    If the user enables the setting “Do not prune discussion messages” it’s expected to be applied for all the discussion messages, not only for the creation one.
  • In the channel that the discussion was created the user still can see the number of messages in the button, but if he clicks on it the whole discussion is erased

Further comments

TC-805

Copy link

changeset-bot bot commented Nov 30, 2023

🦋 Changeset detected

Latest commit: 84655ea

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 30 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/gazzodown Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/api-client Patch
@rocket.chat/license Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/ddp-client Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/models Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/instance-status Patch

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

Copy link

codecov bot commented Nov 30, 2023

Codecov Report

Merging #31113 (84655ea) into develop (5224eab) will increase coverage by 1.07%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #31113      +/-   ##
===========================================
+ Coverage    57.18%   58.25%   +1.07%     
===========================================
  Files          880     1760     +880     
  Lines        19925    33639   +13714     
  Branches      3719     6907    +3188     
===========================================
+ Hits         11395    19598    +8203     
- Misses        7841    12500    +4659     
- Partials       689     1541     +852     
Flag Coverage Δ
e2e 51.46% <ø> (+9.09%) ⬆️
unit 76.63% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@matheusbsilva137 matheusbsilva137 added this to the 6.6 milestone Dec 1, 2023
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Dec 4, 2023
@dionisio-bot dionisio-bot bot added stat: ready to merge PR tested and approved waiting for merge and removed stat: ready to merge PR tested and approved waiting for merge labels Dec 4, 2023
@kodiakhq kodiakhq bot merged commit 92ee9fa into develop Dec 4, 2023
42 checks passed
@kodiakhq kodiakhq bot deleted the fix/discussions-pruned-cron branch December 4, 2023 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants