diff options
Diffstat (limited to '')
-rw-r--r-- | app/class/agent.class.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/class/agent.class.php b/app/class/agent.class.php index c8e6436..4c75f0b 100644 --- a/app/class/agent.class.php +++ b/app/class/agent.class.php @@ -75,6 +75,21 @@ abstract class agent extends obj } /* + * Check whether this agent is assigned to the given issue + */ + public function isAssignedTo(issue $issue) : bool + { + foreach ($issue->getAssignees() as $assign) + { + if ($assign->assignee->guid == $this->guid + && $assign->dismissed == "") + return true; + } + + return false; + } + + /* * Send an email message to this agent using stored configuration * parameters. If config is not established, delivery is not * attempted. Return status. |