[6.x]: Element index sorted by a custom field ignores the sort direction

Aperta
#20,204 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
65/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
php
Ambito
backend

Direzione di ricerca

Reproduce this on a 6.x-dev entries index with a plain text field filled on some entries, then inspect the handling of sort[0][field]=fieldInstance:<uid> and sort[0][direction]. Compare ascending and descending results; done means descending returns the reverse order of ascending, while sorting by title or postDate remains unaffected.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug repo:cms
What happened?
Steps to reproduce
  1. Open an entries index whose entry type has a plain text field that is filled in on some entries (here a "Director" field).
  2. Open View and set Sort by to that field.
  3. Switch the direction between ascending and descending.
Expected behavior

Descending lists the rows in the reverse order of ascending.

Actual behavior

Both directions return the same rows in the same (ascending) order. Requesting sort[0][field]=fieldInstance:<uid>&sort[0][direction]=desc returns the same rows as asc: empty values first, then A to Z. Sorting by title or postDate is not affected.

Craft CMS version

6.x-dev @ 420552c31b

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions
Lingua principale
PHP
Stelle
3.6k
Fork
712
Merge medio
12h 40m
PR unite (30g)
344

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di craftcms/cms

Tutte le issue di craftcms/cms

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.