Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
13.4.7
-
None
-
Unknown
-
Description
The notifications filters API exposed in $services.notifications.filters (https://extensions.xwiki.org/xwiki/bin/view/Extension/Notifications%20API/Notification%20Filters%20API/) is very generic and looks incomplete.
Its functions are far from the UI, especially as modified for XWIKI-18406 .
The generic concept of filter & filter preference is rather hard to grasp and use.
This issue is about adding clear and easy to use APIs to manipulate that list is displayed on the UI as 'Custom filters'. IIUC the documentation, these would be the filter preferences of the scopeNotificationFilter.
For XWIKI-18406 I think, there was a function added to add a new scope notification filter for a user (a new custom filter), but there are no functions to:
- list all of them
- easily check if there is any filter for a location
- remove a filter - actually, the function exists but the caller needs to provide an ID to this function which is hard to get because the listing functions don't exist.
Globally, this API should be more geared towards the concepts that are presented on the UI so that first and foremost it provides the possibility to programatically manipulate the config, just as one would do it from the UI, and then it can have additional functions that give access to more complex things.
Attachments
Issue Links
- is related to
-
XWIKI-18406 Distinguish between system filters and custom filters in notification settings
- Closed
- relates to
-
XWIKI-20649 Provide an API to allow watching a page for a subset of events
- Open