[buddypress-trac] [BuddyPress Trac] #8642: Marking read notifications as unread in bulk not updating object cache (counts)
buddypress-trac
noreply at wordpress.org
Thu Feb 24 09:11:23 UTC 2022
#8642: Marking read notifications as unread in bulk not updating object cache
(counts)
--------------------------------------+---------------------
Reporter: niftythree | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 10.2.0
Component: Toolbar & Notifications | Version: 10.1.0
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests |
--------------------------------------+---------------------
Changes (by imath):
* keywords: has-patch needs-unit-tests => has-patch has-unit-tests
Comment:
Hi @oztaser
I've added two patches, the first one
([https://buddypress.trac.wordpress.org/attachment/ticket/8642/8642.tests.patch
8642.tests.patch]) only contains unit tests. If we only apply this one,
the
`test_bp_notifications_clear_all_for_user_cache_before_update_when_marked_unread()`
one is failing (marking a list of notification ids as unread).
If we apply your patch, it's fixing the issue, but I believe it's best to
use the `$update_args` that is passed into
`bp_notifications_clear_all_for_user_cache_before_update()` to set the
`$is_new` parameter of `BP_Notifications_Notification::get()`. See
[https://buddypress.trac.wordpress.org/attachment/ticket/8642/8642.alt.patch
8642.alt.patch].
What do you think?
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8642#comment:3>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list