Filter expired requests

Hello,

We have a field on Request called Due Date of type Date and on search we just want to search for request that didn’t expired.
An expired Request is a Request that have the field Due Date before today.

You have any hook that filter the search of Request so we can get the due date field and show or not on the results.

Or have a new field on requests called expired and have a schedular at the end of day update all request to expired that have due date before today, and on search filter for expired equals false.

Can you give a suggestion what will be more easy to do, or any hook action that allow me to that, I can customize later.

Regards,
Bernardo Barradas

Hi,

Please try to use this hook hivepress/v1/events/daily, performed once a day.

We recommend that you link the logic you need to this daily action (to search for requests by the date attribute custom you added, and if it’s an expired date, change the request status to draft or trash.

Hi,

Thanks for suggestion.

I already did the logic and add a Cron t it.

It seems fine.

Regards.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.