dereuromark / cakephp-queue

Queue plugin for CakePHP - simple, pure PHP and without dependencies.
MIT License
306 stars 137 forks source link

add status column to searchable fields #342

Closed LordSimal closed 2 years ago

LordSimal commented 2 years ago

It would come in handy for me if the status field would also be part of the search

dereuromark commented 2 years ago

Isnt the search a free text field? The status is below as type for search already.

LordSimal commented 2 years ago

Right... well i use the status field like a more general text description of what the state of that task is. Therefore a predefined list of items is not really suitable in my case. How about then making the searchable fields configurable? 😄 I dont like having multiple "free text" search inputs

dereuromark commented 2 years ago

There should still be only completed and in_progress etc, and they are rather internal, no? Not sure how using free text search here on those is helpful.

LordSimal commented 2 years ago

Maybe this example explains it a bit further:

image

As you see in the screenshot I have a generic UpdatePlugin Task which can be used to update a given plugin (stated in the status column) and is connected to a given Website via the reference column (which I blurred out)

So depending on when plugin developers release new versions I may have a huge amount of entries inside there to filter/search through because currently I have over 500 domains in my system.

The provided friendsofcake/search filter with Job-Task is already pretty nice but I would like to combine that with what I proposed above to search for a specific plugin which has been updated.


Actually now that I am thinking about it a event inside the friendsofcake/search plugin to extend already processed searchmanagers would solve this issue 🤔

dereuromark commented 2 years ago

Looks to me more like status should remain internal enum, and you should add a custom status_text or status_details for what u want to expose?

LordSimal commented 2 years ago

Well at least your documentation leads the users to use the status field as a free to use text area (at least it did for me 😄) https://github.com/dereuromark/cakephp-queue/tree/master/docs#updating-progressstatus

Guess I will have to extend the table class and overwrite the searchmanager method to extend it with the new columns you mentioned.