Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter matching context by last modification date #431

Open
lutangar opened this issue Aug 2, 2021 · 3 comments
Open

Filter matching context by last modification date #431

lutangar opened this issue Aug 2, 2021 · 3 comments
Labels
API 🤖 All things related to the current API (v4) help wanted

Comments

@lutangar
Copy link
Member

lutangar commented Aug 2, 2021

@felix-lambert said: Would that be complicated to only fetch modified matching context?

On Api V4: https://api.dismoi.io/v4 it would be rather easy to add such filters, see api-platform documentation:
https://api-platform.com/docs/core/filters/#search-filter

But first we must add 2 properties on the MatchingContext entity. Take example on the Notice entity:
https://github.com/dis-moi/backend/blob/master/src/Entity/Notice.php#L257-L282

Then some logic must be aded to update both dates, again you may take example on the NoticeListener, see the listener and the required annotation :
https://github.com/dis-moi/backend/blob/master/src/Entity/Notice.php#L33

@lutangar lutangar added API 🤖 All things related to the current API (v4) help wanted labels Aug 2, 2021
@JalilArfaoui
Copy link
Member

What about deletions ?

@lutangar
Copy link
Member Author

lutangar commented Sep 2, 2021

Could be done via a soft delete feature with a deletedAt properties and why not a isDeleted getter.
I think you mentioned another solution that might be better to handle the usecase... feel free to edit the title of this issue to better reflect the issue we're trying to solve here.
This title is too precise and emphasize a possible solution and not the actual issue.

@JalilArfaoui
Copy link
Member

@lutangar Yes, a soft delete would enable us to set up a differential matching contexts update …

I’m not sure that this is high-priority though…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API 🤖 All things related to the current API (v4) help wanted
Projects
None yet
Development

No branches or pull requests

2 participants