Bug Fix: Job Quick-Logging with Queues

Jobs logged cannot be quick-logged if they are added into a queue.
'Device Held' can only be configured if the authorization is given.
This commit is contained in:
Gary Sharp
2014-02-13 22:26:26 +11:00
parent 68256d7abd
commit 7027b33fe2
7 changed files with 180 additions and 81 deletions
+5 -1
View File
@@ -397,7 +397,11 @@ namespace Disco.Web.Controllers
}
else
{
if (Authorization.Has(Claims.Job.Actions.Close) && m.QuickLog.HasValue && m.QuickLog.Value && m.QuickLogTaskTimeMinutes.HasValue && m.QuickLogTaskTimeMinutes.Value > 0)
if (Authorization.Has(Claims.Job.Actions.Close)
&& m.QuickLog.HasValue && m.QuickLog.Value
&& m.QuickLogTaskTimeMinutes.HasValue && m.QuickLogTaskTimeMinutes.Value > 0
&& (j.JobQueues == null || j.JobQueues.All(jqj => jqj.RemovedDate.HasValue))
)
{
// Quick Log
// Set Opened Date in the past