New

Date Filter - Give the possibility to use "older then xxx days/weeks/months/years"

With the data archiver feature, I am getting more and more feedbacks from customer who were expecting the hability to clean data according to the last time the record was modified.

For instance, I want to clean Notes that where not modified since 2 years.

Currently, it can't be done. They have to set a specific date, and move it each time they want to clean

  • In the current data archiver you can only use the existing datetime widgets from Sugar.

    To add an additional filter handling like "older than x days" or "older than x years" you need a very expensive extension of the existimg dattime filter handling.

    But, as always in Sugar there are diffent ways to Rome (in Italy not US).

    The data archiver is implemented in the API module .../modules/DataArchiver/clinets/base/api/DataArchiverAPI.php.

    This module is customizable.

    So, if you create a custom extension which e.g.checks the name of the data archiver record and if this name is sth. like "#2yearsold" it could create the filter on the fly in your custom data archiver API coe. For that you only need an internal convention how to use it and yes, it's quick and dirty but it should be cheap and reliable also.

  • Hey Frédéric,

    since this is posted in suggestions, and not in the dev-forum, I'm assuming you're not asking how to solve this problem using customizations - however, for the sake of completeness (and for other people who might read this), I will just mention that this could definitely be solved by an API + button customization combo.

    In any case, I think this is a specific instance of a more general problem - filtering in Sugar is not always as flexible as one would need it to be. However, there is a solution - it's called QuickQuery, and can be purchased from SugarOutfitters. What you mention specifically (and much more), is possible using QuickQuery - check out the documentation on temporal values. You're specific need could be solved using the following query in the Notes module:

    Disclaimer: I am the author of QuickQuery.