From 96a6f845dcf1ee7298c7bc781cb0f9e1ca4162c5 Mon Sep 17 00:00:00 2001 From: Adam Ruzicka Date: Mon, 8 Jan 2024 15:47:06 +0100 Subject: [PATCH] Fixes #37036 - Hide next occurrence unless RL is active in API --- app/views/foreman_tasks/api/recurring_logics/base.json.rabl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/foreman_tasks/api/recurring_logics/base.json.rabl b/app/views/foreman_tasks/api/recurring_logics/base.json.rabl index 572a328aa..24b4976eb 100644 --- a/app/views/foreman_tasks/api/recurring_logics/base.json.rabl +++ b/app/views/foreman_tasks/api/recurring_logics/base.json.rabl @@ -6,4 +6,4 @@ attributes :id, :cron_line, :end_time, :iteration, :task_group_id, :state, node(:task_count) { |rl| rl.tasks.count } node(:action) { |rl| rl.tasks.first.try(:action) } node(:last_occurence) { |rl| rl.last_task&.started_at } -node(:next_occurence) { |rl| rl.next_task&.start_at } +node(:next_occurence) { |rl| rl.next_task&.start_at if rl.state == 'active' }