Green
12-04-06, 12:05 AM
I wish to make available a quick hack which I hope someone with more time and internal DP working knowledge can fashion into a complete module. Here are the three scripts:
Notify (http://download.scibit.com/beta/dp/notify.zip)
You can simply install them into a for example ./modules/notify directory. The scripts require no database schema changes, nor are the scripts currently a full module, and can therefore not be installed into DP in the normal DP manner. Then create a simple batch process which will call all three scripts (with or without parameters) and schedule the batch file. The three scripts have the following respective functionality:
Main purpose - email-notify assignees of a task if:
1. Slip - A task which is slipping when compared with it's dates, ex. Task stands at 30%, but when start and end date are compared to today, the task should be at 50%. The task assignees, task owner as well as project owner will receive an email, as this potentially constitute a slippage of the project's critical path and therefore the project carries a high risk of failure.
2. Due - A notice which will be send out by default the last 2 days of a task's period, if the task is not yet at 90%+ progress. Kind of reminding the workers to get their asses moving or they will potentially miss the target date, in which case it becomes a slippage.
3. Depend - This is a nice notice, as it will automatically email the task assignees the moment a dependent task has finished. Ex. You have a task "Quote Acceptance" and tasks A,B which are dependent on the quote being accepted before commencing. So the moment the acceptance task reach 100% and task A and B is still at 0%, will the assignees of task A and B receive emails to remind them that the quote was accepted and that they should start with A and B.
I would also like to suggest the following changes to DP 2.01 code which helped me:
To enable task_notify such that the web always reflect the actual database value for a task:
tasks.class.php, comment lines 107 to 109:
// if (!$this->task_notify) {
// $this->task_notify = 0;
// }
ae_resource.php, line +-80, remove value="1" parameter:
<input type="checkbox" name="task_notify" <?php if($obj->task_notify!=0) echo "checked"?> /> <?php echo $AppUI->_( 'notifyChange' );?>
To enable a guest login and/or an URL auto login if the user session cookie is still alive with any redirect URL:
DPDir\index.php, line 136:
if (isset($_REQUEST['login']) || isset($_POST['login'])) {
$username = dPgetParam( $_REQUEST, 'username', dPgetParam( $_POST, 'username', 'guest' ) );//$username = dPgetParam( $_POST, 'username', '' );
$password = dPgetParam( $_REQUEST, 'password', dPgetParam( $_POST, 'password', 'guest' ) );//$password = dPgetParam( $_POST, 'password', '' );
$redirect = str_replace(';','&',dPgetParam( $_REQUEST, 'redirect', '' ));
$AppUI->setUserLocale();
@include_once( "$baseDir/locales/$AppUI->user_locale/locales.php" );
@include_once "$baseDir/locales/core.php";
$ok = isset($_REQUEST['username'])?$AppUI->login( $username, $password ):1;
You can now specify URLs like:
http://myprojects/?login&redirect=tasks;a=view;task_id=1
which will log you in as Guest with Guest's privileges or with your previous session if you did not log out.
PS: It will take a skilled module writer no more than 30mins to whip these scripts into a module, and with a couple of hours more, extensions like picking which projects and tasks should get notifications using a notify sql table will be possible. Picking projects and tasks would however be the only reason to make a module of it, as the main purpose is to have the scripts scheduled and run independent of an actual user browsing the DP. Is also why I opted to rather use an existing task property, task_notify. That said, a "Check and Notify All Now" module button/link would also be a breeze to implement.
The scripts, however, are completely intact already, easy to change and fully functional and does not require any module functionality, i.e. they already run "out-of-the-box" so to speak.
Notify (http://download.scibit.com/beta/dp/notify.zip)
You can simply install them into a for example ./modules/notify directory. The scripts require no database schema changes, nor are the scripts currently a full module, and can therefore not be installed into DP in the normal DP manner. Then create a simple batch process which will call all three scripts (with or without parameters) and schedule the batch file. The three scripts have the following respective functionality:
Main purpose - email-notify assignees of a task if:
1. Slip - A task which is slipping when compared with it's dates, ex. Task stands at 30%, but when start and end date are compared to today, the task should be at 50%. The task assignees, task owner as well as project owner will receive an email, as this potentially constitute a slippage of the project's critical path and therefore the project carries a high risk of failure.
2. Due - A notice which will be send out by default the last 2 days of a task's period, if the task is not yet at 90%+ progress. Kind of reminding the workers to get their asses moving or they will potentially miss the target date, in which case it becomes a slippage.
3. Depend - This is a nice notice, as it will automatically email the task assignees the moment a dependent task has finished. Ex. You have a task "Quote Acceptance" and tasks A,B which are dependent on the quote being accepted before commencing. So the moment the acceptance task reach 100% and task A and B is still at 0%, will the assignees of task A and B receive emails to remind them that the quote was accepted and that they should start with A and B.
I would also like to suggest the following changes to DP 2.01 code which helped me:
To enable task_notify such that the web always reflect the actual database value for a task:
tasks.class.php, comment lines 107 to 109:
// if (!$this->task_notify) {
// $this->task_notify = 0;
// }
ae_resource.php, line +-80, remove value="1" parameter:
<input type="checkbox" name="task_notify" <?php if($obj->task_notify!=0) echo "checked"?> /> <?php echo $AppUI->_( 'notifyChange' );?>
To enable a guest login and/or an URL auto login if the user session cookie is still alive with any redirect URL:
DPDir\index.php, line 136:
if (isset($_REQUEST['login']) || isset($_POST['login'])) {
$username = dPgetParam( $_REQUEST, 'username', dPgetParam( $_POST, 'username', 'guest' ) );//$username = dPgetParam( $_POST, 'username', '' );
$password = dPgetParam( $_REQUEST, 'password', dPgetParam( $_POST, 'password', 'guest' ) );//$password = dPgetParam( $_POST, 'password', '' );
$redirect = str_replace(';','&',dPgetParam( $_REQUEST, 'redirect', '' ));
$AppUI->setUserLocale();
@include_once( "$baseDir/locales/$AppUI->user_locale/locales.php" );
@include_once "$baseDir/locales/core.php";
$ok = isset($_REQUEST['username'])?$AppUI->login( $username, $password ):1;
You can now specify URLs like:
http://myprojects/?login&redirect=tasks;a=view;task_id=1
which will log you in as Guest with Guest's privileges or with your previous session if you did not log out.
PS: It will take a skilled module writer no more than 30mins to whip these scripts into a module, and with a couple of hours more, extensions like picking which projects and tasks should get notifications using a notify sql table will be possible. Picking projects and tasks would however be the only reason to make a module of it, as the main purpose is to have the scripts scheduled and run independent of an actual user browsing the DP. Is also why I opted to rather use an existing task property, task_notify. That said, a "Check and Notify All Now" module button/link would also be a breeze to implement.
The scripts, however, are completely intact already, easy to change and fully functional and does not require any module functionality, i.e. they already run "out-of-the-box" so to speak.