Bug 16518

Summary: layerindex: REST API ignores the "orderby" parameter
Product: [Yocto Project Subprojects] Layer Index Reporter: Tim Orling <tim.orling>
Component: Layer IndexAssignee: Tim Orling <tim.orling>
Status: NEW --- QA Contact: apoorv sangal <apoorvsangal>
Severity: normal    
Priority: Medium    
Version: 6.1   
Target Milestone: 6.2   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Tim Orling 2026-11-16 04:19:32 UTC
params_to_queryset() in layerindex/querysethelper.py validates orderby and works out the column and direction, but never calls order_by() on the queryset, so the parameter has no effect:

    /layerindex/api/layerItems/?orderby=name:asc
    /layerindex/api/layerItems/?orderby=name:desc

both return the same order. Either apply it (queryset.order_by(column)) or drop the parameter. Found while fuzz testing a bench instance.