diff options
| author | Malf Furious <m@lfurio.us> | 2018-10-21 23:07:10 -0400 | 
|---|---|---|
| committer | Malf Furious <m@lfurio.us> | 2018-10-21 23:07:10 -0400 | 
| commit | c2d42ce0239c8da0cb9acea922f6dea183196225 (patch) | |
| tree | 25de675749e54e144eda7d8be63d61e572c94dd4 | |
| parent | a18205b9991f9e5d6ac0a86aa37f049bf53980f6 (diff) | |
| download | scrott-c2d42ce0239c8da0cb9acea922f6dea183196225.tar.gz scrott-c2d42ce0239c8da0cb9acea922f6dea183196225.zip  | |
agent:  Add function isAssignedTo()
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.  | 
