Skip to content

Conversation

@daften
Copy link

@daften daften commented Oct 26, 2025

This PR adds filtering and sorting for custom fields in a generic way. This was tested in a limited capacity and doesn't encompass everything, e.g. filtering on text fields only works to filter empty items.
Nevertheless , I think this is already a useful addition.

My main use case is I have a boolean extra field that I check when I open a roll. This allows me to filter all open spools e.g.

The changes were done for all data types and several tests were written.

Disclaimer: I am not a Python developer and this was largely done using AI. Any feedback si more than welcome. High-level this looks okay to me, but I most likely miss items that are important to get this perfect. I also had issues with circular imports that I now fixed doing the imports not in the header, feedback on this is definitely more than welcome.

@daften
Copy link
Author

daften commented Dec 7, 2025

Is there something I can do to move this forward or make this ready for consideration? :)

@kubrick89
Copy link

I've cloned daften repo and i'm using this to filter extra.nfc_id created by filaman. Works great to retieve the spool id to activate the spool in moonraker.

@DanielNagy
Copy link

+1 for this to merge into master :)

@daften
Copy link
Author

daften commented Feb 8, 2026

Something I missed before and noticed when starting to rebase, the integration tests for postgres fail. There were also significant issues in the tests written. i've fixed the tests, but haven't had time to fix the issues with postgres, which is because of json_extract. I'll come back to that at a later time

@daften daften force-pushed the feature/custom-field-filter-sort branch from 1ae07d5 to f545ae5 Compare February 8, 2026 22:46
@daften
Copy link
Author

daften commented Feb 8, 2026

Actually was able to fix it and the tests seem to run well and I was able to rebase everything on master. All feedback welcome :)

@daften daften force-pushed the feature/custom-field-filter-sort branch from f545ae5 to 33c669e Compare February 8, 2026 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants