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

Room info retention policy banner does not take exclude pinned messages and only delete files into account in its message. #12182

Open
per-bohlin opened this issue Sep 27, 2018 · 2 comments

Comments

@per-bohlin
Copy link

Description:

When the retention policy for messages are activated, and the option "Only delete files" is selected,
the message at top of channels are correctly showing:

Unpinned files older than 30 days are automatically pruned here (messages stay intact)

However, the retention policy message shown on the group info page, shows:

Messages older than 30 days are automatically pruned here

Steps to reproduce:

  1. Go to Administration -> Retention Policy and activate retention policy.
  2. In the global policy section, set "True for "applies to ..." for channels, private groups and direct messages, and select 30 days retention policy.
  3. Set "True" for "Exclude pinned messages"
  4. Set "True" for "Only delete files"
  5. Go to a private group and scroll to the top of the messages to view the message. It will read "Unpinned files older than 30 days are automatically pruned here (messages stay intact)"
  6. Go to the same private group and click the group info page. The retention message will read
    "Messages older than 30 days are automatically pruned here"

Expected behavior:

The expectation is that the retention policy message/notice should be the same at the top of the message history and on the group/channel info page.

Actual behavior:

The retention policy message/notice on the group/channel info age does not take "exclude pinned messages" and "only delete files" into account when displaying the message.

Server Setup Information:

  • Version of Rocket.Chat Server: 0.69.2
  • Operating System: Linux
  • Deployment Method: docker
  • Number of Running Instances: 2
  • DB Replicaset Oplog: Enabled
  • NodeJS Version: v8.11.3
  • MongoDB Version: "latest version provided by docker deployment at (Sep 27, 2018)"

Additional context

N/A

Relevant logs:

N/A

@dannysauer
Copy link

This block looks like it's properly configured, but it's seemingly behaving as if the filesOnly and excludePinned vars aren't defined, so it always falls back to the "messages" message.

<div class="mail-messages__instructions-text">
{{#unless filesOnly}}
{{#unless excludePinned}}
{{_ "RetentionPolicy_RoomWarning" time=purgeTimeout}}
{{else}}
{{_ "RetentionPolicy_RoomWarning_Unpinned" time=purgeTimeout}}
{{/unless}}
{{else}}
{{#unless excludePinned}}
{{_ "RetentionPolicy_RoomWarning_FilesOnly" time=purgeTimeout}}
{{else}}
{{_ "RetentionPolicy_RoomWarning_UnpinnedFilesOnly" time=purgeTimeout}}
{{/unless}}
{{/unless}}
</div>

I don't know enough about the project to debug further (or to be sure I debugged correctly to this point, for that matter). But I'm adding a comment in hopes that someone might notice the issue. :)

@Kot-o-pes
Copy link

Same behavior on 5.4.0 with teams

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants