Skip to content

Unread Notifications Count from API doesn't Match Embedded Forum Widget #687

Open
@brooketopcoder

Description

@brooketopcoder

https://topcoder.atlassian.net/browse/PROD-1860

Steps to Reproduce

  1. Log in as jcori / appirio123
  2. Go to details for "sdgun 3/4" project
  1. Go to messages tab
  2. View the messages widget and the response to this api call

Expected Results

The # of new messages highlighted in the widget matches the number of unread messages returned by the api call

Actual Results

The widget displays 3 new message, but the api call returns 0

mismatched unread notifications

To investigate

Have a look at how the unread count is calculated here. This is what will need to be updated.

https://github.com/topcoder-platform/forums-groups-plugin/blob/cddf06f3b2ff13958a2402723731fa8f00e3fd3e/models/class.groupmodel.php#L1423

Note that the count on the forum, shown as 1 New in the screenshot above probably doesn't have much correlation to what is being calculated, but the new requirement is to have this "unreadNotification" count better match what's displayed on the actual group page, as opposed to the notifications displayed in the Vanilla app.

You will need to completely replace the unread notification function above with a completely new implementation that calculates based on what's displayed in the 1 New / 2 New items in the screenshot above, which is likely going to be an entirely new SQL query targeting separate tables.

Testing

Note that the self-service MFE code referenced from the MFE wrapper above is here:

https://github.com/topcoder-platform/mfe-customer-work

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions