about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/database.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/database.rs b/src/database.rs
index 4553460..8a7c6c9 100644
--- a/src/database.rs
+++ b/src/database.rs
@@ -354,7 +354,7 @@ pub fn get_list_by_name(task_name: String) -> Result<Vec<Task>, rusqlite::Error>
     let mut tasks_vec: Vec<Task> = Vec::new();
     let name_param = format!("%{}%", task_name);
 
-    let mut query = conn.prepare("SELECT * FROM tasks WHERE lower(task_name) LIKE lower(:task_name)")?;
+    let mut query = conn.prepare("SELECT * FROM tasks WHERE lower(task_name) LIKE lower(:task_name) ORDER BY task_name")?;
     let task_iter = query.query_map(&[(":task_name", &name_param)], |row| {
         Ok(Task {
             id: row.get(0)?,