[OpenNMS/opennms] 4787f3: NMS-20283: Count notifications, not deliveries, in...
Marshall Massengill via opennms-cvs <[email protected]>
| Newsgroups | gmane.network.opennms.cvs |
|---|---|
| Message-ID | <OpenNMS/opennms/push/refs/heads/mm/NMS-20283-smoke/[email protected]> |
Branch: refs/heads/mm/NMS-20283-smoke
Home: https://github.com/OpenNMS/opennms
Commit: 4787f3d877af3a0aa00be765af20fe89da3e6b26
https://github.com/OpenNMS/opennms/commit/4787f3d877af3a0aa00be765af20fe89da3e6b26
Author: Marshall Massengill <[email protected]>
Date: 2026-09-01 (Tue, 01 Sep 2026)
Changed paths:
M opennms-dao-api/src/main/java/org/opennms/netmgt/dao/api/NotificationDao.java
M opennms-dao-mock/src/main/java/org/opennms/netmgt/dao/mock/MockNotificationDao.java
M opennms-dao/src/main/java/org/opennms/netmgt/dao/hibernate/NotificationDaoHibernate.java
M opennms-webapp-rest/src/main/java/org/opennms/web/rest/v1/NotificationRestService.java
M opennms-webapp-rest/src/test/java/org/opennms/web/rest/v1/NotificationRestServiceIT.java
Log Message:
-----------
NMS-20283: Count notifications, not deliveries, in the notification summary
/notifications/summary derived userUnacknowledgedCount, teamUnacknowledgedCount
and the newest-notifications list from a criteria join to usersNotified, and
countMatching counts join rows. A notification carries one usersNotified row per
notification method, so a user notified by both email and pager was counted
twice and appeared twice in the list. On a real install the personal count came
back larger than the total unacknowledged count, and the header badge disagreed
with the notification list it links to.
CriteriaBuilder.distinct() does not fix this for OnmsNotification: the rewrite
restricts on a property literally named "id" while this entity's identifier is
notifyId, so the count came back zero. The three queries move to NotificationDao
as HQL that counts distinct notifyId and selects distinct notifications.
This changes a published REST field: installs whose users have several
notification methods configured will see these counts drop to the real number
of notifications.
To unsubscribe from these emails, change your notification settings at https://github.com/OpenNMS/opennms/settings/notifications
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/wiki/index.php?page=MailingListFaq
opennms-cvs mailing list
To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-cvs