diff --git a/tests/test_scheduler.py b/tests/test_scheduler.py
index 3b7b9f0..a74ad17 100755
--- a/tests/test_scheduler.py
+++ b/tests/test_scheduler.py
@@ -2879,8 +2879,13 @@
         status_jobs = set()
         for p in data['pipelines']:
             for q in p['change_queues']:
+                if q['dependent']:
+                    self.assertEqual(q['window'], 20)
+                else:
+                    self.assertEqual(q['window'], 0)
                 for head in q['heads']:
                     for change in head:
+                        self.assertTrue(change['active'])
                         self.assertEqual(change['id'], '1,1')
                         for job in change['jobs']:
                             status_jobs.add(job['name'])
diff --git a/zuul/model.py b/zuul/model.py
index 8b76ff4..2ae2e2f 100644
--- a/zuul/model.py
+++ b/zuul/model.py
@@ -254,6 +254,8 @@
             j_queue = dict(name=queue.name)
             j_queues.append(j_queue)
             j_queue['heads'] = []
+            j_queue['window'] = queue.window
+            j_queue['dependent'] = queue.dependent
 
             j_changes = []
             for e in queue.queue:
@@ -313,6 +315,7 @@
     def formatItemJSON(self, item):
         changeish = item.change
         ret = {}
+        ret['active'] = item.active
         if hasattr(changeish, 'url') and changeish.url is not None:
             ret['url'] = changeish.url
         else:
@@ -686,6 +689,7 @@
         self.enqueue_time = None
         self.dequeue_time = None
         self.reported = False
+        self.active = False
 
     def __repr__(self):
         if self.pipeline:
diff --git a/zuul/scheduler.py b/zuul/scheduler.py
index 213c23a..2c8ed4c 100644
--- a/zuul/scheduler.py
+++ b/zuul/scheduler.py
@@ -1135,6 +1135,8 @@
                 pass
             return (True, nnfi)
         dep_item = self.getFailingDependentItem(item)
+        actionable = change_queue.isActionable(item)
+        item.active = actionable
         if dep_item:
             failing_reasons.append('a needed change is failing')
             self.cancelJobs(item, prime=False)
@@ -1153,11 +1155,11 @@
                 change_queue.moveItem(item, nnfi)
                 changed = True
                 self.cancelJobs(item)
-            if change_queue.isActionable(item):
+            if actionable:
                 self.prepareRef(item)
                 if item.current_build_set.unable_to_merge:
                     failing_reasons.append("it has a merge conflict")
-        if change_queue.isActionable(item) and self.launchJobs(item):
+        if actionable and self.launchJobs(item):
             changed = True
         if self.pipeline.didAnyJobFail(item):
             failing_reasons.append("at least one job failed")
