Jump to content

Extension:Semantic Tasks

From mediawiki.org
MediaWiki extensions manual
Semantic Tasks
Release status: stable
Implementation Notify
Description Provides email task notifications and reminders
Author(s)
Maintainer(s) SMW Project
Latest version 2.1.0 (2022-9-12)
MediaWiki 1.35+
PHP 5.6+
Database changes No
Composer mediawiki/semantic-tasks
License GNU General Public License 2.0 or later
Download
README

  • $wgSemanticTasksNotifyIfUnassigned

Compatibility

  • Semantic MediaWiki 3.2+

The Semantic Tasks extension works in conjunction with another extension, Semantic MediaWiki, to provide email task notifications and reminders.

Semantic Tasks was originally developed for the Creative Commons internal task- and project-tracking system ccTeamspace. Development was sponsored by KDZ - Centre for Public Administration Research and is currently maintained by KM-A Knowledge Management Associates.

Description

[edit]
  • After a task creation, users assigned to the task and following the task receive a "New Task" mail containing the task text.
  • After a task is modified, users assigned to the task and following the task receive a "Task Updated" mail containing a diff of the modification.
  • The editor of the task doesn't receive a mail after his edit.
  • If the edit is a null or minor edit, no mail is sent.

Installation

[edit]
  • Install the Semantic MediaWiki extension which is requrired for this extenion to work.
  • Download and move the extracted SemanticTasks folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/SemanticTasks
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'SemanticTasks' );
    
  • Setup cron and configure as required.
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Basic usage

[edit]

The extension sends email notifications to the assigned users of a page as soon as the page is modified or created with a non null and non minor edit and it contains one or more Assigned to:: properties.


(note multiple Assigned to:: users)

Notify a group

[edit]

The extension also supports the assignment of task pages to groups. In order to assign a task page to a group create a page named for instance "ST group" and list in that page the assignees of that group in the following form [[Has assignee::User:User a]], [[Has assignee::User:User b]], etc., as follows:

Then set the task page as follows

Note that the properties Has assignee, Assignee to and Assigned to group must be of type page.

Status

[edit]

The behavior of the Status has changed since version 2.1.0. Now the status of the task can be set to closed, as follows [[Status::Closed]], to disable notifications and reminders. Other values for the Status property, will not be evaluated by the extension.

Reminders

[edit]

Reminders (i.e. background email notifications) will be sent to the assignees of a task whenever a [[Reminder at::]] or [[Target date::]] properties are set in a given day, as follows:

Note that Target date must be a future or current day date, and Status must not be set to "Closed" in order for it to work.

See section below #Cron job for the server set-up.

Configuration

[edit]

The following variables are to be set in the LocalSettings.php file of your wiki. None of them are required, if not set the default values are used.

Parameters

[edit]
variable description default
$wgSemanticTasksNotifyIfUnassigned Sets whether an assignee should be notified once unassigned from a task. false

i18n

[edit]

The following configuration parameters allow to set the names of the properties used by the extension to localized names suitable for the wiki instance's language or to different names suitable to the needs specific to your wiki:

variable description default
$stgPropertyAssignedTo Sets the name of the property holding the name of the user to whom the respective task was assigned to. Assigned to
$stgPropertyCarbonCopy Sets the name of the property holding the name of the user who should get an information about the respective task. Carbon copy
$stgPropertyTargetDate Sets the name of the property holding the target date on which respective task should be completed. Target date
$stgPropertyReminderAt Sets the name of the property holding the date on which a reminder for the respective task should be sent. Reminder at
$stgPropertyStatus Sets the name of the property holding the status of the respective task. Status
$stgPropertyAssignedToGroup Sets the name of the property holding the name of the group of users to who the respective task was assigned to. Assigned to group
$stgPropertyHasAssignee Sets the name of the property holding the name of the users assigned to a group. Has assignee

Cron job

[edit]

Finally run a cron job once a day to execute the reminder script. To do so edit your crontab file:

$ crontab -e

And add the following line to execute the script every day at 12:

0 12 * * * php extensions/SemanticTasks/maintenance/checkForReminders.php
Usually the system administrator of the server servicing the respective wiki sets up the cron job. In version 2.0.0 the name of the maintenance scipt changed from "ST_CheckForReminders.php" to "checkForReminders.php". Moreover the script is now located in the "maintenance" directory of the extension.


The actual sending of the emails is performed when a task has valid assignees ( Assigned to, Carbon copy, or Assigned to group properties), Target date or Reminder at are set to the same day in which the script runs, and Status is not set to "Closed". Finally, only users who have set a valid email address in their preferences, and have confirmed it will receive emails.

See also

[edit]