private function isUsed(Tracker_Artifact_ChangesetValue $changeset_value) { $ugroup_ids = $changeset_value->getPerms(); if (count($ugroup_ids) === 1 && (int) $ugroup_ids[0] === ProjectUGroup::ANONYMOUS) { return false; } return count($ugroup_ids) > 0; }
/** * Fetch the html code to display the field value in tooltip * * @param Tracker_Artifact $artifact * @param Tracker_Artifact_ChangesetValue_PermissionsOnArtifact $value The changeset value for this field * @return string */ protected function fetchTooltipValue(Tracker_Artifact $artifact, Tracker_Artifact_ChangesetValue $value = null) { $html = ''; if ($value && $artifact->useArtifactPermissions()) { $ugroup_dao = $this->getUGroupDao(); $perms = $value->getPerms(); $perms_name = array(); foreach ($perms as $perm) { $row = $ugroup_dao->searchByUGroupId($perm)->getRow(); $perms_name[] = util_translate_name_ugroup($row['name']); } $html .= implode(",", $perms_name); } return $html; }