Uploaded image for project: 'Kuali Rice Development'
  1. Kuali Rice Development
  2. KULRICE-12171

KualiHelpAction.getAttributeHelpText throws NPEs in some cases

    Details

    • Type: Bug Fix
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.3.3
    • Fix Version/s: Backlog
    • Component/s: User Interface
    • Security Level: Public (Public: Anyone can view)
    • Labels:
    • Rice Module:
      KNS
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Code Review Status:
      Not Required
    • Include in Release Notes?:
      Yes

      Description

      In Rice 2.x, there appears to be a KualiHelpAction bug that is causing the main getAttributeHelpText() method to throw an NullPointerException in certain situations. If the field has an associated AttributeDefinition and its "summary" text is non-blank, then the code will retrieve the definition's "required" indicator and continue its processing. However, the value of the "required" indicator can be a null Boolean object if the attribute does not set this property, which can cause the subsequent booleanValue() call on the object to throw a NPE.

      An easy way to recreate the error is to enable field-level help links for Rice, then open the doc search and click the help link for the "Date Created From" field.

      The simplest fix is to update the getAttributeHelpText() method so that if the attribute's "required" indicator is null, then assume it is set to false.

        Attachments

          Activity

          Hide
          jcoltrin Jessica Coltrin (Inactive) added a comment -

          Chad, since this is KNS it's in the Backlog. However if you're willing to provide a patch we can consider applying it.

          Show
          jcoltrin Jessica Coltrin (Inactive) added a comment - Chad, since this is KNS it's in the Backlog. However if you're willing to provide a patch we can consider applying it.
          Hide
          chagstrom Chad Hagstrom added a comment -

          I've attached a patch that applies the fix to the Rice 2.3.3 version of the file. It should just be a one-line change to the KualiHelpAction class.

          Show
          chagstrom Chad Hagstrom added a comment - I've attached a patch that applies the fix to the Rice 2.3.3 version of the file. It should just be a one-line change to the KualiHelpAction class.

            People

            • Assignee:
              Unassigned
              Reporter:
              chagstrom Chad Hagstrom
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: