Uploaded image for project: 'Grouper'
  1. Grouper
  2. GRP-1905

Cannot find groups having a particular attribute value

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • None
    • API
    • None

    Description

      We are attempting to use GroupAttributeFilter to find groups having a particular attribute value. The code looks like this:

      GrouperSession gs = <get session>
      GroupAttributeFilter gaf = new GroupAttributeFilter(
           "bath:provisionClass", "groupmanager-groups",
           StemFinder.findRootStem(gs));
      Set<Group> ggroups = gaf.getResults(gs);

      No results are returned. This appears to be because in Hib3GropDAO.findAllByApproximateAttrHelper the following code...

      String attributePrefix = legacyAttributeStemName + ":" + legacyAttributePrefix; if (attr.startsWith(attributePrefix)) {
           byHql.setString("attributeName",  attr); } else {
           byHql.setString("attributeName",  attributePrefix + attr); }

      ...is actually setting the name of the attribute being examined to:

      etc:legacy:attribute:legacyAttribute_bath:provisionClass

      Are we missing something, or is there a bug here?

      We are using version 2.3.0 of the grouper Maven artifact, but this code seems unchanged in the latest updates to GitHub.

      Attachments

        Activity

          People

            chad.redman@at.internet2.edu Chad Redman (unc.edu)
            sla23 Stefano Angioni (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: