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

Obsidian Attendance Detail block doesn't create attendance records for people who didn't attend #5554

Closed
1 task done
leahjennings opened this issue Aug 23, 2023 · 2 comments

Comments

@leahjennings
Copy link
Collaborator

Please go through all the tasks below

  • Check this box only after you have successfully completed both the above tasks

Please provide a brief description of the problem. Please do not forget to attach the relevant screenshots from your side.

Since our upgrade to v15, we've noticed that the Percent Attended column of the Group Attendance page always shows 100%, regardless of the number of people who actually attended. Here's a screenshot of what it looks like in our instance:
image

Looking at how AttendanceRate is calculated, it appears that it is taking the total number of attendees with the "Did Attend" flag set to true divided by the total number of attendee records for that occurrence. Looking through the table, the people who didn't attend don't have attendance records with "Did Attend" set to false, therefore the math will always calculate to 100% attended.

I used the SQL below to determine this behavior is incorrect. Looking at the same group in our production instance that is represented in the screenshot above, before the upgrade to v15 there was an attendance record created for each group member, with the Did Attend flag set to true if they were marked as attended. Post-v15 upgrade, only the people who were marked present have attendance records created.

SELECT *
  FROM Attendance a
    JOIN AttendanceOccurrence ao ON (ao.Id = a.OccurrenceId)
 WHERE ao.GroupId = ### -- ### is the Group Id of the group in question
 ORDER BY ao.Id DESC

The post-v15 upgrade is significant because ever since we have been using the Obsidian Attendance Detail block.

Expected Behavior

I would expect that attendance records would get created for all individuals in the group, with the Did Attend flag correctly set to true/false depending on whether or not they were marked as attended.

Actual Behavior

Attendance records only get created for those who attended, so the Percent Attended column on the group attendance page is always 100%.

Steps to Reproduce

  1. On the demo site, hover over the Person icon in the sidebar and click on Group Viewer

  2. Expand Section A, and click on one of the groups in the list (for this example, I'm using Decker Group)

  3. Click on the attendance checkbox icon
    image

  4. Click on one of the attendance occurrences (I clicked on 8/14/23)
    image

  5. Click on Cindy Decker and Ted Decker to mark them as "attended"

    • Note that this should calculate percent attended at 50%, since only half of the people were marked attended
  6. Click on the Back button

  7. Notice that 8/14/23 occurrence now shows 100% attended even though only 2 of the 4 were marked attended
    image

Rock Version

Rock McKinley 15.0 (1.15.0.16)

Client Culture Setting

en-US

@nairdo
Copy link
Member

nairdo commented Aug 25, 2023

Hi @leahjennings We think this is possibly a duplicate of #5473 which was fixed in v15.1 via ddbcf61

I updated the Demo site to v15.1 and tested this issue there to verify, but please let me know if I'm mistaken.
chrome_J2GW1ixw1F

@leahjennings
Copy link
Collaborator Author

Agreed @nairdo - thanks for the clarity! Apologies for the duplicate!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants