Repository: kestra-io/kestra
Issue: Execution filters are emptied when going back from an execution detail
Labels: bug
enhancement

### Expected Behavior

_No response_

### Actual Behaviour

Filter executions by FAILED state
Go in an execution detail
Go to previous page
Your filters are reset

### Steps To Reproduce

_No response_

### Environment Information

- Kestra Version: 0.11.0-SNAPSHOT
- Operating System (OS / Docker / Kubernetes):
- Java Version (If not docker):


### Example flow

_No response_

Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/ui/src/components/executions/Executions.vue b/ui/src/components/executions/Executions.vue
index 59d3d5792c..1a6364437d 100644
--- a/ui/src/components/executions/Executions.vue
+++ b/ui/src/components/executions/Executions.vue
@@ -15,7 +15,7 @@
                 </el-form-item>
                 <el-form-item>
                     <status-filter-buttons
-                        :value="$route.query.state"
+                        :value="Utils.asArray($route.query.state)"
                         @update:model-value="onDataTableValue('state', $event)"
                     />
                 </el-form-item>
@@ -168,6 +168,7 @@
     import Delete from "vue-material-design-icons/Delete.vue";
     import StopCircleOutline from "vue-material-design-icons/StopCircleOutline.vue";
     import Pencil from "vue-material-design-icons/Pencil.vue";
+    import Utils from "../../utils/utils";
 </script>
 
 <script>
diff --git a/ui/src/components/taskruns/TaskRuns.vue b/ui/src/components/taskruns/TaskRuns.vue
index ab90ff4a11..ec4c6f8118 100644
--- a/ui/src/components/taskruns/TaskRuns.vue
+++ b/ui/src/components/taskruns/TaskRuns.vue
@@ -15,7 +15,7 @@
                 </el-form-item>
                 <el-form-item>
                     <status-filter-buttons
-                        :value="$route.query.state"
+                        :value="Utils.asArray($route.query.state)"
                         @update:model-value="onDataTableValue('state', $event)"
                     />
                 </el-form-item>
@@ -121,7 +121,9 @@
         </data-table>
     </div>
 </template>
-
+<script setup>
+    import Utils from "../../utils/utils";
+</script>
 <script>
     import {mapState} from "vuex";
     import DataTable from "../layout/DataTable.vue";
diff --git a/ui/src/utils/utils.js b/ui/src/utils/utils.js
index 79412b7e59..2eb04fca11 100644
--- a/ui/src/utils/utils.js
+++ b/ui/src/utils/utils.js
@@ -184,4 +184,12 @@ export default class Utils {
     static splitFirst(str, separator){
         return str.split(separator).slice(1).join(separator);
     }
+
+    static asArray(objOrArray) {
+        if(objOrArray === undefined) {
+            return [];
+        }
+
+        return Array.isArray(objOrArray) ? objOrArray : [objOrArray];
+    }
 }


Test patch:
diff --git a/core/src/test/java/io/kestra/core/runners/MultipleConditionTriggerTest.java b/core/src/test/java/io/kestra/core/runners/MultipleConditionTriggerTest.java
index 56263c1019..212a4d5d7d 100644
--- a/core/src/test/java/io/kestra/core/runners/MultipleConditionTriggerTest.java
+++ b/core/src/test/java/io/kestra/core/runners/MultipleConditionTriggerTest.java
@@ -4,6 +4,7 @@
 import org.junit.jupiter.api.Test;
 
 import jakarta.inject.Inject;
+import org.junitpioneer.jupiter.RetryingTest;
 
 @MicronautTest
 public class MultipleConditionTriggerTest extends AbstractMemoryRunnerTest {
@@ -15,7 +16,7 @@ void trigger() throws Exception {
         runnerCaseTest.trigger();
     }
 
-    @Test
+    @RetryingTest(5)
     void triggerFailed() throws Exception {
         runnerCaseTest.failed();
     }