Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array sort is only affected by first field #2403

Closed
danielfowler opened this issue May 30, 2019 · 0 comments

Comments

Projects
None yet
3 participants
@danielfowler
Copy link

commented May 30, 2019

{{ auditions sort="day:asc|time:asc" }} will sort by the day key within auditions, but not time

To Reproduce
YAML:

auditions:
  -
    day: 2019-05-14
    time: 07:00
  -
    day: 2019-05-13
    time: 16:00
  -
    day: 2019-05-14
    time: 22:00
  -
    day: 2019-05-14
    time: 16:00

HTML:

{{ auditions sort="day:asc|time:asc" }}
<li>{{ day }} @ {{ time }}</li>
{{ /auditions }}

Expected behavior

  • 2019-05-13 @ 16:00
  • 2019-05-14 @ 07:00
  • 2019-05-14 @ 16:00
  • 2019-05-14 @ 22:00

Screenshots
Ignore the end times, that's a separate value not included above because it's irrelevant.
image

Environment details (please complete the following information):

  • Statamic Version 2.11.3
  • Fresh Install or Upgrade: Neither
  • Windows 10
  • Browser: Firefox
  • Web Server: Apache
  • PHP Version: 7.2
  • Addons installed:

Additional context
Add any other context about the problem here.

@jesseleite jesseleite self-assigned this Jun 27, 2019

@jesseleite jesseleite closed this Jun 27, 2019

@jesseleite jesseleite reopened this Jun 27, 2019

@jackmcdade jackmcdade closed this Jun 28, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.