Question

I want to detect which tasks are not finished and alert the users when they open SharePoint 2013.

How can I detect tasks that are not finished? Or task that has not been viewed?

Was it helpful?

Solution

I can give you two options :

  • SharePoint Timer Job

Alerting users when they open SharePoint 2013 is not possible. But you can create a Timer Job solution that runs Daily/Weekly. This will iterate through all the the sites and then tasks list within a web application.This way you can get all the unfinished task from the list and then use SPUtility.SendMail() to send the mail to the respective users.You will put the logic within the Execute method of the timer job and schedule the run time using SPSchedule object by overriding the FeatureActivated method.

You can find step by step process on how to create the timer job below :

Timer Job Link 1

Timer Job Link 2

  • SharePoint Designer Workflow

SharePoint 2013 workflow manager comes with advanced options which can be used to simulate a Timer Job. You can create a stage in the workflow that will use the REST API /_api/web/lists/getListByTitle(‘ListTitle’)/items" to get the items from task list and you can process items which are not finished. Finally you can pause the workflow for another 24 hours, so that the workflow will run everyday.

Disadvantage : You will have to associate the workflow with each task list

Below implementation shows how to process Task List Over Due items on a daily basis. You can tweak it for 'Unfinished' tasks.

Timer Job Simulation using Workflow

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top