summaryrefslogtreecommitdiffstats
path: root/app/class/agent.class.php
diff options
context:
space:
mode:
authorMalf Furious <m@lfurio.us>2018-10-22 00:17:58 -0400
committerMalf Furious <m@lfurio.us>2018-10-22 00:17:58 -0400
commit176f65e60daa2a777aa03744c4df477cc812523d (patch)
tree820633bafe627f3fc86a3ec4cc070ec7795a4a7b /app/class/agent.class.php
parent055c62010b7d37760458ceea6dfe7363746bfca0 (diff)
parent384f2649b714d310b385a59cc34d11fff1d85ef2 (diff)
downloadscrott-176f65e60daa2a777aa03744c4df477cc812523d.tar.gz
scrott-176f65e60daa2a777aa03744c4df477cc812523d.zip
Merge branch 'feature/rework-issue' into dev
Diffstat (limited to 'app/class/agent.class.php')
-rw-r--r--app/class/agent.class.php15
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.