Grocy: Enhancement: Sort userfeilds in userentities

Created on 17 Nov 2020  路  5Comments  路  Source: grocy/grocy

Please describe what you would find useful and please also check (by searching open requests here) if that was maybe already requested.

See below, I have tried everything available in the UI and SQLiteDB to sort these userfeilds in a workflow sense (start date first) but cant figure it out.

Is there a way you know of doing this or is this something you can add whenever you get around to it?

I have no JS experience but I decently understand the API and SQLite so my thought as just an idea would be adding a "sort_order_position" number (and some UI sorting method) to the userfeild, then making that unique PER the (user)enitity

image

enhancement

Most helpful comment

Awesome, ill wait for 2:11PM (CST) for pre-release to refresh and test it out.

All 5 comments

They are currently orderd by the name field, happens here:
https://github.com/grocy/grocy/blob/887526c72740001957afe2eab99ca9cad28ded95/services/UserfieldsService.php#L68

Of course we can add a numeric field and order by that.

Done. 馃檪

Simply a new numeric field "Sort number" per Userfield.

Awesome, ill wait for 2:11PM (CST) for pre-release to refresh and test it out.

Just another little thing I noticed about Userobjects:
I think it's more handy when using dialogs to add/edit custom objects there - so have added that in https://github.com/grocy/grocy/commit/2b4d8a7cc56b7df1c42d5c814f1d81fff7d978d1.

And off-topic here, but I see that you maybe want to do more testing using the pre-release demo - thanks for testing! :)

That it get reset every hour is not so good for those scenarios, so I'll take care about to make #395 possible in the next days.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jayaddison picture jayaddison  路  5Comments

Germs2004 picture Germs2004  路  3Comments

skettydog picture skettydog  路  4Comments

CorneliousJD picture CorneliousJD  路  4Comments

Anroxo picture Anroxo  路  4Comments