Remembering the collapsing state impossible?

First time I work intensive with the scheduler as there is an instance with a lot of scheduler tasks.
For a better handling I use the scheduler groups and assign the task into groups.
For a better overview I collapse all groups and expand the group I work with at the moment.
But on each reload (e.g. edit or de-activate) the status which group is expanded/ which is collapsed changes to a pattern I can’t assign.
e.g. all groups collapsed and second group expanded. on reload all groups (including 2nd group) are collapsed except 4th which is expanded.
(TYPO3 12.4.14)
What am I doing wrong?
Or is it a bug?
Can anyone confirm?

Indeed, there is something wrong, same version used here. When I look at the payload for toggling a group in a scenario with 5 groups and 1 or more tasks per group the payload only changes for 1 specific group. Transmitted payload:

action: set
key: moduleData.scheduler_manage
value[task-group-0]: 1
value[task-group-1]: 1
value[task-group-2]: 1
value[task-group-3]: 0
value[task-group-4]: 0

In my case only clicks for “task-group-3” change the payload while nothing happens for the others. The response is always the same.

I’d investigate “typo3/sysext/scheduler/Resources/Private/Partials/TaskList.html” where initially buttons for collapsed groups seem to miss the “collapsed” CSS class + “typo3/Build/Sources/TypeScript/scheduler/scheduler.ts” as even with the template change “storeCollapseState” sends other values that don’t seem to correlate to the current status of the groups.

Ok I’ve got a fix. The system doesn’t store the toggle status based on group UID but based on the position in the list. But when building the initial list the array uses the UIDs, so the output seems random.

  1. in “typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php” add
    $groups = array_values($groups);
    before
    $groups = array_map(…);

  2. in “typo3/sysext/scheduler/Resources/Private/Partials/TaskList.html” replace
    class=“btn btn-sm btn-default t3js-toggle-table”
    with
    class=“btn btn-sm btn-default t3js-toggle-table{f:if(condition: group.taskGroupCollapsed, then: ’ collapsed’)}”

Anyone feel free to file in Forge.

This only works though until a new group is added. As the list adds new groups on the top the old groups get a +1 for their position, so previous collapsed/open status is now incorrect for all old groups. Should probably be reworked to sort the groups e.g. alphabetically and to use only the group UIDs for storage.