From 3fd32e3512a3f517c9a2628fce174b96d4eee803 Mon Sep 17 00:00:00 2001 From: Grzegorz Orczykowski Date: Wed, 25 Oct 2023 15:13:14 +0200 Subject: [PATCH] Merge pull request #5797 from grzesiek2010/COLLECT-5796 Fixed searching in the list of drafts --- .../java/org/odk/collect/android/dao/CursorLoaderFactory.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/collect_app/src/main/java/org/odk/collect/android/dao/CursorLoaderFactory.java b/collect_app/src/main/java/org/odk/collect/android/dao/CursorLoaderFactory.java index b66a99b3fa5..1ab53bd52a0 100644 --- a/collect_app/src/main/java/org/odk/collect/android/dao/CursorLoaderFactory.java +++ b/collect_app/src/main/java/org/odk/collect/android/dao/CursorLoaderFactory.java @@ -51,10 +51,10 @@ public CursorLoader createEditableInstancesCursorLoader(CharSequence charSequenc cursorLoader = getInstancesCursorLoader(selection, selectionArgs, sortOrder); } else { - String selection = DatabaseInstanceColumns.STATUS + " =? " + + String selection = "(" + DatabaseInstanceColumns.STATUS + "=? or " + DatabaseInstanceColumns.STATUS + "=? or " + DatabaseInstanceColumns.STATUS + "=?)" + "and " + DatabaseInstanceColumns.DISPLAY_NAME + " LIKE ?"; String[] selectionArgs = { - Instance.STATUS_INCOMPLETE, + Instance.STATUS_INCOMPLETE, Instance.STATUS_INVALID, Instance.STATUS_VALID, "%" + charSequence + "%" };