2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-02-02 03:14:56 +00:00

[API] Allow sorting of test results by start/finish time (#11232)

* [API] Allow sorting of test results by start/finish time

- Bring API in line with UI expectation

* Bump API version

* Allow ordering by "test_station" field

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
This commit is contained in:
Oliver
2026-02-01 22:01:31 +11:00
committed by GitHub
parent 5d34bd1ea6
commit c8c6a6af5f
2 changed files with 12 additions and 2 deletions

View File

@@ -1,11 +1,15 @@
"""InvenTree API version information."""
# InvenTree API version
INVENTREE_API_VERSION = 445
INVENTREE_API_VERSION = 446
"""Increment this API version number whenever there is a significant change to the API that any clients need to know about."""
INVENTREE_API_TEXT = """
v446 -> 2026-02-01 : https://github.com/inventree/InvenTree/pull/11232
- Allow ordering of test results by started_datetime and finished_datetime fields
- Allow ordering of test results by test_station field
v445 -> 2026-01-29 : https://github.com/inventree/InvenTree/pull/11102
- Added "allocated_lines" field to SalesOrderSerializer to track fully allocated line items

View File

@@ -1452,7 +1452,13 @@ class StockItemTestResultList(
output_options = StockItemTestResultOutputOptions
filterset_fields = ['user', 'template', 'result', 'value']
ordering_fields = ['date', 'result']
ordering_fields = [
'date',
'result',
'started_datetime',
'finished_datetime',
'test_station',
]
ordering = 'date'