foxmask/Booster

Sort by date desc

Closed this issue · 2 comments

Todo in all the lists of items : sort on date desc, but on the version date, otherwise, new version will not raise the items on top of the list.
Currently do a sort ASC.

This should do the trick to avoid a lot of line of PHP :-)

  • alter table boo_items add column date_version datetime
  • create trigger upd_date_version_on_boo_items AFTER INSERT on boo_version
    for each row
    BEGIN
    UPDATE boo_items SET date_version = NEW.created WHERE boo_items.id = NEW.item_id;
    END;

Then in the boo_items.dao, add a sort on date_version if exists or on "created";

this trigger is too permissive because it will be triggered not just for one moderation task but for each insert .

So i've handled that behavior by hand