I have created below work flow to add all developers into authorised repliers.
But new issues created by fetching e-mail from Inbox have only email ID of sender in the authorised replier list.
Please suggest me if I have to do any more changes to the work flow
class AuthorisedRepliers_Workflow_Backend extends Abstract_Workflow_Backend
{
/**
* Allows all users with a role of developer or above to email
*
* @param integer $prj_id The project ID.
* @param integer $issue_id The ID of the issue
* @param string The email address that is trying to send an email
* @return boolean true if the sender can email the issue, false if the sender
* should not email the issue and null if the default rules should be used.
*/
function canEmailIssue($prj_id, $issue_id, $email)
{
// get usr_id
$usr_id = User::getUserIDByEmail($email);
if ((!empty($usr_id)) && (User::getRoleByUser($usr_id, $prj_id) >= User::getRoleID("Developer"))) {
return true;
} else {
return null;
}
}
}
I have created below work flow to add all developers into authorised repliers.
But new issues created by fetching e-mail from Inbox have only email ID of sender in the authorised replier list.
Please suggest me if I have to do any more changes to the work flow
------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- --- once(APP_ INC_PATH . "workflow/ class.abstract_ workflow_ backend. php");
<?php
require_
class AuthorisedRepli ers_Workflow_ Backend extends Abstract_ Workflow_ Backend $prj_id, $issue_id, $email) ByEmail( $email) ; getRoleByUser( $usr_id, $prj_id) >= User::getRoleID ("Developer" ))) {
{
/**
* Allows all users with a role of developer or above to email
*
* @param integer $prj_id The project ID.
* @param integer $issue_id The ID of the issue
* @param string The email address that is trying to send an email
* @return boolean true if the sender can email the issue, false if the sender
* should not email the issue and null if the default rules should be used.
*/
function canEmailIssue(
{
// get usr_id
$usr_id = User::getUserID
if ((!empty($usr_id)) && (User::
return true;
} else {
return null;
}
}
}