Cannot find groups having a particular attribute value

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major
    • 4.17.0, 5.15.0
    • Affects Version/s: None
    • Component/s: API
    • None

      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.

            Assignee:
            Chad Redman
            Reporter:
            Stefano Angioni (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: