groton-school / blackbaud-to-google-group-sync

Sync entries in Blackbaud LMS Advanced Lists (potentially of community groups) to Google Groups
GNU General Public License v3.0
0 stars 0 forks source link

#42 #45

Closed github-actions[bot] closed 1 year ago

github-actions[bot] commented 1 year ago

Appears that listMembers() returns an array of Member-like

objects, but not actually members. They are missing the

`delivery_settings` field. Which means that to get the

delivery settings for each member, each member would need to

be individually queried per group, which is prohibitively

resource expensive.

https://api.github.com/groton-school/blackbaud-to-google-group-sync/blob/6c30da3acbb2f3f1756fa7df850b0dc4daa18750/src/server/Workflows/sync.php#L125


            /** @var DirectoryMember $gMember */
            if (array_key_exists($gMember->getEmail(), $bbMembers)) {
                unset($bbMembers[$gMember->getEmail()]);
            /*
             * TODO #42
             *   Appears that listMembers() returns an array of Member-like
             *   objects, but not actually members. They are missing the
             *   `delivery_settings` field. Which means that to get the
             *   delivery settings for each member, each member would need to
             *   be individually queried per group, which is prohibitively
             *   resource expensive.
             */
                /*
            if ($gMember->getDeliverySettings() != $deliverySettings) {
                $oldDeliverySettings = $gMember->getDeliverySettings();
                $gMember->setDeliverySettings($deliverySettings);
                $gMember = $directory->members->update(
                    $bbGroup->getParamEmail(),
                    $gMember->getId(),
                    $gMember
                );
                $listProgress->setStatus(
                    "Updated {$gMember->email} delivery_settings from to '{$gMember->getDeliverySettings()}'"
                );
            }
            */
            } else {
                if (
                    ($gMember->getRole() !== 'OWNER' ||
battis commented 1 year ago

(Accidental) duplicate of #42