Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to define user based notification rules? #12

Open
gesinn-it-gea opened this issue Oct 4, 2016 · 6 comments
Open

Is there a way to define user based notification rules? #12

gesinn-it-gea opened this issue Oct 4, 2016 · 6 comments

Comments

@gesinn-it-gea
Copy link
Member

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.

@kghbln kghbln added the question label Oct 5, 2016
@kghbln
Copy link
Member

kghbln commented Oct 5, 2016

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.

@gesinn-it-gea
Copy link
Member Author

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

@kghbln
Copy link
Member

kghbln commented Oct 5, 2016

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

@mwjames
Copy link
Contributor

mwjames commented Oct 5, 2016

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

@gesinn-it-gea
Copy link
Member Author

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

@mwjames
Copy link
Contributor

mwjames commented Oct 5, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants