@managemint-solutions/sdk 0.32.0 → 0.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tasks/index.js +2 -2
- package/package.json +1 -1
package/dist/tasks/index.js
CHANGED
|
@@ -103,8 +103,8 @@ class TasksResource {
|
|
|
103
103
|
.order('created_at', { ascending: false })
|
|
104
104
|
.range(offset, offset + pageSize - 1);
|
|
105
105
|
if (trimmedSearch) {
|
|
106
|
-
// "12" or "
|
|
107
|
-
const taskNumber = trimmedSearch.match(
|
|
106
|
+
// "TASK-12", "#12" or "12" also finds task number 12; anything else is a text search only.
|
|
107
|
+
const taskNumber = trimmedSearch.match(/^(?:[a-z]+-|#)?(\d+)$/i)?.[1];
|
|
108
108
|
const textFilter = (0, transforms_1.orIlike)(['name', 'description'], trimmedSearch);
|
|
109
109
|
tasksQuery = tasksQuery.or(taskNumber ? `${textFilter},task_id.eq.${taskNumber}` : textFilter);
|
|
110
110
|
}
|
package/package.json
CHANGED