jethro-pmm icon indicating copy to clipboard operation
jethro-pmm copied to clipboard

Roster 'people assigned' analysis breaks if no Roster Roles are present

Open jefft opened this issue 8 months ago • 0 comments

Under Rosters -> Display Roster Assignments, Jethro now displays some stats about assignees (unless ROSTERS_HIDE_ANALYSIS is is defined):

image

This section breaks if a Roster View contains only Service Fields, and no Roster Roles:

image

The logged error is

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')
                                ) x
                                GROUP BY personid, first_name, last_name
                                HAVING date_count ...' at line 9
Line 171 of /home/jethro/code/2.35.1/app/include/jethrodb.php

To replicate, go to Rosters -> Define Roster Views, and define a minimal view containing only Service Fields:

image

Then view your new roster.

jefft avatar Jun 21 '24 11:06 jefft