Closed hichamboushaba closed 2 weeks ago
1 Message | |
---|---|
:book: | This PR contains changes to Tracks-related logic. Please ensure (author and reviewer) the following are completed:
|
Generated by :no_entry_sign: Danger
📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.
App Name | WooCommerce Android | |
Flavor | Jalapeno | |
Build Type | Debug | |
Commit | 53d9227754b73a9cd047d835474d1dda477e627d | |
Direct Download | woocommerce-prototype-build-pr11530-53d9227.apk |
Attention: Patch coverage is 41.37931%
with 17 lines
in your changes are missing coverage. Please review.
Project coverage is 40.46%. Comparing base (
e4cc452
) to head (4be19ab
). Report is 54 commits behind head on trunk.:exclamation: Current head 4be19ab differs from pull request most recent head 73e7b31
Please upload reports for the commit 73e7b31 to get more accurate results.
Files | Patch % | Lines |
---|---|---|
...ce/android/ui/main/ObserveProcessingOrdersCount.kt | 57.14% | 7 Missing and 2 partials :warning: |
...ndroid/ui/dashboard/data/ObserveSiteOrdersState.kt | 0.00% | 8 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@0nko thanks for the test, can you invite me to your store to check this? This doesn't happen on my store, trash
is not returned as a status option for me, which means the trashed orders are not counted.
Description
In some cases, and given the fact that order status options are fetched only on app launch and when switching sites, it could happen that the app shows the performance card for stores with no orders or vice versa.
This PR fixes this by making two changes:
ObserveProcessingOrdersCount
to always use the order status API for infering the number of processing orders, instead of using the/wc-analytics/reports/totals
endpoint, this update will allow us to refresh the cache whenever any changes happen.ObserveSiteOrdersState
to observe the changes of order status options instead of retrieving a single snapshot.With these two changes, the dashboard will always observe the updated state.
Testing instructions
undo
action that we use before trashing the order).Images/gif
https://github.com/woocommerce/woocommerce-android/assets/1657201/75de6a5a-537d-4fd6-878c-22bac62c5e47
RELEASE-NOTES.txt
if necessary. Use the "[Internal]" label for non-user-facing changes.