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: wrong dates on last x date on omnichannel reports #34113

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

MartinSchoeler
Copy link
Contributor

@MartinSchoeler MartinSchoeler commented Dec 4, 2024

Proposed changes (including videos or screenshots)

Fixes dates being incorrect when fetching omnichannel reports, for example currently asking for last month will return the last 30 days, even if the month just started, this fixes

last week
last month
last 6 months
last year

Issue(s)

SUP-703

@MartinSchoeler MartinSchoeler requested a review from a team as a code owner December 4, 2024 18:54
Copy link

changeset-bot bot commented Dec 4, 2024

🦋 Changeset detected

Latest commit: fe21aea

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

This PR includes changesets to release 35 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/api-client Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/ddp-client Patch
@rocket.chat/freeswitch Patch
@rocket.chat/fuselage-ui-kit 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/license Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/network-broker Patch
@rocket.chat/models Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/ui-voip 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
Contributor

dionisio-bot bot commented Dec 4, 2024

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

Copy link
Contributor

github-actions bot commented Dec 4, 2024

PR Preview Action v1.4.8
🚀 Deployed preview to https://RocketChat.github.io/Rocket.Chat/pr-preview/pr-34113/
on branch gh-pages at 2024-12-20 14:03 UTC

Copy link

codecov bot commented Dec 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.81%. Comparing base (6423a2c) to head (fe21aea).
Report is 63 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #34113      +/-   ##
===========================================
+ Coverage    75.75%   75.81%   +0.05%     
===========================================
  Files          510      512       +2     
  Lines        22078    22221     +143     
  Branches      5387     5407      +20     
===========================================
+ Hits         16726    16846     +120     
- Misses        4706     4722      +16     
- Partials       646      653       +7     
Flag Coverage Δ
unit 75.81% <ø> (+0.05%) ⬆️

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

KevLehman
KevLehman previously approved these changes Dec 4, 2024
@KevLehman
Copy link
Contributor

is there any way to test the component? even with unit tests 👀

@KevLehman KevLehman added this to the 7.2.0 milestone Dec 13, 2024
Copy link
Member

@MarcosSpessatto MarcosSpessatto left a comment

Choose a reason for hiding this comment

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

Is there any way to test this?

@MartinSchoeler
Copy link
Contributor Author

About tests, we currently mock the return of the server with an object, but the changes I've made would affect the parameters sent to the server and its return, so I don't think we can mock that, we would probably need to find a way to inject data into the db or mock the whole endpoint

@KevLehman @MarcosSpessatto

@KevLehman
Copy link
Contributor

But maybe we can have some units on the component to validate that the dates will be the right ones, no? 🤔

dougfabris
dougfabris previously approved these changes Dec 18, 2024
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

Successfully merging this pull request may close these issues.

5 participants