Skip to content

fix: settings-related statistics not being updated according to license changes#32237

Merged
kodiakhq[bot] merged 6 commits intodevelopfrom
fix/settings-statistics
Apr 20, 2024
Merged

fix: settings-related statistics not being updated according to license changes#32237
kodiakhq[bot] merged 6 commits intodevelopfrom
fix/settings-statistics

Conversation

@aleksandernsilva
Copy link
Copy Markdown
Contributor

@aleksandernsilva aleksandernsilva commented Apr 17, 2024

Proposed changes (including videos or screenshots)

Changes were made to the statistics to ensure that settings-related information is current.

Previously, some parts of the code were accessing setting information directly from the collection, bypassing license considerations.
To address this, the code was changed to utilize the settings.get util function.

The util (settings) already has the logic built-in to deliver the correct setting value based on the active license, thus ensuring that the data is always up-to-date.

Issue(s)

CONN-134

Steps to test or reproduce

  • Change the value of a premium only setting (Ex.: enable Message_Read_Receipt_Enabled)
  • Call /v1/statistics?refresh=true
  • Notice that the value for readReceiptEnabled is true
  • Remove the license from the workspace (premium only settings should return to invalidValue)
  • Call /v1/statistics?refresh=true
  • Notice that the value from readReceiptEnabled which should be false is still true

Further comments

@dionisio-bot
Copy link
Copy Markdown
Contributor

dionisio-bot bot commented Apr 17, 2024

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 17, 2024

🦋 Changeset detected

Latest commit: 4e9fefb

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

This PR includes changesets to release 32 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/apps 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-avatar 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

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 53.52%. Comparing base (62ac207) to head (4e9fefb).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #32237      +/-   ##
===========================================
- Coverage    55.34%   53.52%   -1.82%     
===========================================
  Files         2326     2208     -118     
  Lines        51331    49472    -1859     
  Branches     10502    10103     -399     
===========================================
- Hits         28408    26482    -1926     
- Misses       20407    20605     +198     
+ Partials      2516     2385     -131     
Flag Coverage Δ
e2e 51.22% <ø> (-3.49%) ⬇️
unit 74.92% <ø> (ø)

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

@aleksandernsilva aleksandernsilva changed the title fix: settings-related statistics not using settings.get fix: settings-related statistics not being updated according to license changes Apr 17, 2024
@aleksandernsilva aleksandernsilva added this to the 6.8 milestone Apr 17, 2024
@aleksandernsilva aleksandernsilva marked this pull request as ready for review April 18, 2024 14:07
@aleksandernsilva aleksandernsilva requested a review from a team as a code owner April 18, 2024 14:07
@sampaiodiego sampaiodiego added the stat: QA assured Means it has been tested and approved by a company insider label Apr 20, 2024
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Apr 20, 2024
@kodiakhq kodiakhq bot merged commit b8d36f6 into develop Apr 20, 2024
@kodiakhq kodiakhq bot deleted the fix/settings-statistics branch April 20, 2024 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants