dlr-gtlab / gtlab-core

GTlab Core Framework
https://www.gtlab.de
Other
7 stars 2 forks source link

🐛 [BUG] - Enable collection sorting for collections without additional parameters in items #1262

Closed jensschmeink closed 1 month ago

jensschmeink commented 1 month ago

Summary

Currently e.g. the material collection cannot be sorted by name. The reason seems to be:
In the LocalCollectionModel there is a check if the list of additional parameters is empty quite in the beginning. As the material collection items do not have additional parameters (only default name and version) the sort function is completely ignored.

This behavior seems easy to be fixed as the check for the additional properties should only be done if really needed (if you want to sort based on them).

Expected Behaviour

Like in the most other collections it should be possible to sort by a click on the header (as even indicated by arrows on the header)

Reproduction steps

1. Go to 'Material collection' and download some materials to have at least 2 local elements
2. Click on the header field of name
3. See that no sorting happens

Screenshots

No response

Logs

No response

GTlab environment

GTlab Version: 2.0.9
Module 1 Version: X.Y.Z
Module 2 Version: X.Y.Z

OS

Windows

jensschmeink commented 1 month ago

Resolved