UI Devs: Achievement UI issue revealed through simple API call

Hello Blizzard UI Devs! I have been working on a feature for my addon to help enable players to use the Ride Along feature to help their friends locate the dragon flying glyphs, but in order to do so, I’m trying to query the achievements API to check for which glyphs the friend has. SEE ALSO mention of ‘isSummary’ variable issue found at the end

While attempting to work with the following API call, I noticed that it reveals some missing checks in the Achievement UI which throws an error:

SetAchievementComparisonUnit(“party1”)

Steps to reproduce:

Invite someone to your party who is standing near your character
Open the achievements panel (keybind Y I believe is default) - this is to assure that the Achievements (Blizzard addon) has loaded.
Close the achievements panel
Make the API call: SetAchievementComparisonUnit(“party1”)

Due to how the event handler inside of the Achievement UI is working, it tries to respond to the event even if the achievement UI is no longer visible, or even if it is not opened to the comparison panel for which the event handler was meant to serve.

The error thrown in 10.0.5 47967 (current 10.0.5 PTR) is as follows:

9x …ns/Blizzard_AchievementUI/Blizzard_AchievementUI.lua:702: Usage: GetCategoryNumAchievements(categoryID, includeSuperceded)
[string “=[C]”]: in function GetCategoryNumAchievements' [string "@Interface/AddOns/Blizzard_AchievementUI/Blizzard_AchievementUI.lua"]:702: in function AchievementFrameComparison_UpdateStatusBars’
[string “@Interface/AddOns/Blizzard_AchievementUI/Blizzard_AchievementUI.lua”]:2697: in function <…ns/Blizzard_AchievementUI/Blizzard_AchievementUI.lua:2693>

Locals:
(*temporary) = “summary”

Additional issue found: Global variable ‘isSummary’ used on line 2092 and 2834 which I believe is not correct: if ( not isSummary ) then ← should be self.isSummary