Problem/Motivation

It would be nice if exception days were sorted from the soonest to today's date to the latest.

Steps to reproduce

If you enter exception hours not in the order of soonest to latest, on the display page the will show up as the were entered. When you go to edit the field, they will show up in the order of soonest to latest. Would be nice if they just always showed up as soonest to latest.

Proposed resolution

Providing patch to fix.

CommentFileSizeAuthor
#2 issue-3355460-order-exception-days.patch633 bytesebremner

Comments

ebremner created an issue. See original summary.

ebremner’s picture

StatusFileSize
new633 bytes

Providing patch to fix

  • johnv committed 6038bd3a on 8.x-1.x
    Issue #3355460 by ebremner: Sort exception days from soonest to latest
    
johnv’s picture

Version: 8.x-1.x-dev » 8.x-1.8
Category: Feature request » Bug report
Status: Active » Fixed

Thanks,
added it to loading, though.
It saves multiple sorting upon formatting (multiple formatters)
and also works for widget.

  • johnv committed 2949849b on 8.x-1.x
    Issue #3355460 by ebremner: Sort exception days from soonest to latest
    
johnv’s picture

A second commit was entered, since the first #3 was breaking things.
https://git.drupalcode.org/project/office_hours/-/commit/2949849b3871f78...

ebremner’s picture

Thanks it worked!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

johnv’s picture

Version: 8.x-1.8 » 8.x-1.9
Status: Closed (fixed) » Needs work
Related issues: +#3363780: Case sensitive TypeError: uasort(): Argument #2 ($callback) must be a valid callback

Reopening, since an error is reported in #3363780: Case sensitive TypeError: uasort(): Argument #2 ($callback) must be a valid callback.
Above patches are included in release 1.9.
The upcoming patch must fix 1.9 .

  • johnv committed 5385b74f on 8.x-1.x
    Issue #3355460: Sort exception days from soonest to latest - fix case...
johnv’s picture

Status: Needs work » Fixed
johnv’s picture

Component: Code » Code - formatter

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.