From e6ab6887515d1466870e8406a8ac80e3524407b0 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Mon, 10 May 2010 09:57:17 -0700 Subject: [PATCH] If a sitename is passed, filter based on sitename for spectre status. Fixes bug #11541. --- docs/changelog/7.x.x.txt | 1 + lib/Spectre/Workflow.pm | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 81da95a28..7fbb443d7 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -2,6 +2,7 @@ - fixed #11556: New cart doesn't work with other forms on the same page - fixed #11557: Shop credit deduction calculated incorrectly - fixed #11561: PayDriver_Cash - password help + - fixed #11541: running workflows screen 7.9.4 - We're shipping underscore.js now for its suite of extremely handy utility diff --git a/lib/Spectre/Workflow.pm b/lib/Spectre/Workflow.pm index f79e0144e..d265d13ca 100644 --- a/lib/Spectre/Workflow.pm +++ b/lib/Spectre/Workflow.pm @@ -295,7 +295,8 @@ sub getJsonStatus { my %output; if ($sitename) { #must have entry for each queue %output = %queues; - foreach my $instance ($self->getInstances) { + INSTANCE: foreach my $instance ($self->getInstances) { + next INSTANCE unless $instance->{sitename} eq $sitename; my $queue = ucfirst($instance->{status}); push @{$output{$queue}}, [$instance->{workingPriority}, $instance->{instanceId}, $instance]; }