sulu / SuluFormBundle

Form Bundle for handling Dynamic and Symfony Forms in https://sulu.io
MIT License
81 stars 78 forks source link

Filter Data and export #283

Open plozmun opened 3 years ago

plozmun commented 3 years ago
Q A
Bug? no
New Feature? yes
Bundle Version -
Sulu Version 2.1
Browser Version All

Actual Behavior

Currently if you have a lot of contacts on a daily basis and you want to make a daily export you have to download everything for filtering. You can receive it by email but many users prefer direct download.

Expected Behavior

Add filtering possibilities like other sulu entities in order to be able to select more specific filtering.

alexander-schranz commented 3 years ago

Which specific filters for the dynamic list data do you want to be implemented to improve your workflow?

plozmun commented 3 years ago

Maybe only be able to filter by "created at" which is not a dynamic field.

niklasnatter commented 3 years ago

Like the idea! If I am not mistaken, this should be quite easy to do by adding the respective filters in the list-configuration 🙂 https://github.com/sulu/SuluFormBundle/blob/4c0c30eb566064af0796ccff0f765433353dc085/Resources/config/lists/forms.xml#L48-L77

alexander-schranz commented 3 years ago

@nnatter the form data (dynamic entity) list metadata are created in PHP as they have no static structure. I think the filter would need to be added here then: https://github.com/sulu/SuluFormBundle/blob/414e0bfbe0d14e91fe28d9b7eb20afcb4c3461fb/Metadata/DynamicListMetadataLoader.php#L63-L72

Also the Controller doesn't use the ListBuilder so the filter would need to be implemented there also.