SemanticMediaWiki/SemanticNotifications

Is there a way to define user based notification rules?

gesinn-it-gea opened this issue · 6 comments

Is there a way, to implement the following workflow:

As a user, I want to track bugs in my wiki. Users can be assigned to a bug using the "bug form". SemanticNotifications should notify the assignee of a bug about any changes on the bug page.

It should be possible if you add a property of type date which updates on every edit of the page. Using special property "modification date" will be to ambiguous for this. Additionally you will have to set up an user group per involved user.

Hi Karsten, I understood the "machanics". I don't want to create an annotation (group) per user but using a rule instead.

This was not clear from what you wrote thus I can only guess which is almost all cases impossible to do correctly. ;) Perhaps there is an easier way - probably as an enhancement? @mwjames

As a user, I want to track bugs in my wiki. Users can be assigned to a bug using the "bug form". SemanticNotifications should notify the assignee of a bug about any changes on the bug page.

The general premises is that we notify about changes to a semantic entity.

For example, if the status of a bug related property changes and the user assigned himself to a group that are to be notified in case of a change event.

Outlined above is related to a group assignment which is difficult to maintain in a task oriented environment or use case such as mentioned in this issue.

To support task related assignments, #13 adds support for Notifications to to assign individual members (Users) to a subject and be notified when a selected property changes its value.

Notifications to has been introduced to make ad-hoc assignments when properties marked with a Notifications on assignment.

[1] contains an example where when the Bug status property changes its value then members from either the Notifications group (within the property) or the Notifications to (within a subject) are being informed.

[0] https://github.com/SemanticMediaWiki/SemanticNotifications/blob/master/docs/02-tips.md#notify-about-project-status-change

[1] http://sandbox.semantic-mediawiki.org/wiki/Bug/0001

I had a look at [1]. Shouldn't there be a [[Notifications to::]] annotation?

[1] http://sandbox.semantic-mediawiki.org/w/index.php?title=Attribut:Bug_status&action=edit

I had a look at [1]. Shouldn't there be a [[Notifications to::]] annotation?

No.

The workflow is the same as described in [0] with the general two components of WHAT triggers an event and WHO will receive a notification:

  • [[Notifications on::+]] is indicating that any change to Bug status should trigger an event
  • [[Notifications to group:: ... ]] could be used but it isn't because in this scenario we leave out the group - user assignment
  • RecursiveMembersIterator [1] tries to determine which group has which users assigned (we don't have a group assigned here) and it further looks for individual members indicated by [[Notifications to:: ... ]] on the subject in question

[[Notifications to:: ... ]] is used for individual assignments on a task/subject level for any change that occurred to a property that was being watched. You could try to make it more restrictive by applying an additional logic (I don't have time to add this) such as:

  • To all found members on [[Notifications to:: ... ]] only send to those members that are
  • Part of a group that has been assigned via [[Notifications to group:: ... ]] to a watched property

Then again, you could use SMW::Notifications::UserCanReceiveNotification [2] to apply customized rules and make the list of recipients more restrictive.

[0] https://github.com/SemanticMediaWiki/SemanticNotifications/blob/master/docs/01-workflow.md
[1] https://github.com/SemanticMediaWiki/SemanticNotifications/blob/master/src/Iterators/RecursiveMembersIterator.php
[2] https://github.com/SemanticMediaWiki/SemanticNotifications/blob/master/src/Iterators/RecursiveMembersIterator.php#L227-L229