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

AbstractLookupableHelperServiceImpl validateSearchParameters throws excepton if errorMap is not empty, which makes LookupAction search call unusable in some situations

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: Development
    • Security Level: Public (Public: Anyone can view)
    • Labels:
    • Rice Module:
      KRAD
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required

      Description

      We have a situation in budget where we are doing some extra processing of lookup results (overriding LookupAction), if there are errors we add them to GlobalVariables errorMap and then call LookupAction.search to redisplay the search
      results. LookupAction:search calls validateSearchParameters on lookupable, which calls lookupableHelperService and the default AbstractLookupableHelperServiceImpl implementation. The default implementation throws an exception at the
      end of processing if the errorMap is not empty:

      if (!GlobalVariables.getErrorMap().isEmpty())

      { throw new ValidationException("errors in search criteria"); }

      So if there were errors previous to the method call but the validation was OK an exception will still be thrown. I believe it would be better if the method just checked for errors encountered within the method itself (maybe by a boolean) and then throw
      an exception, allowing for the errorMap to contain errors from previous code.

        Attachments

          Issue Links

            Activity

            jkneal Jerry Neal (Inactive) created issue -
            jkneal Jerry Neal (Inactive) made changes -
            Field Original Value New Value
            Link This issue cloned from KULRICE-7208 [ KULRICE-7208 ]
            jkneal Jerry Neal (Inactive) made changes -
            Issue Type Task [ 3 ] Improvement [ 4 ]
            Fix Version/s 2.3-backlog [ 16596 ]
            Fix Version/s 2.2 [ 16411 ]
            Fix Version/s 2.2-backlog [ 16475 ]
            Description We have a situation in budget where we are doing some extra processing of lookup results (overriding LookupAction), if there are errors we add them to GlobalVariables errorMap and then call LookupAction.search to redisplay the search
            results. LookupAction:search calls validateSearchParameters on lookupable, which calls lookupableHelperService and the default AbstractLookupableHelperServiceImpl implementation. The default implementation throws an exception at the
            end of processing if the errorMap is not empty:

                   if (!GlobalVariables.getErrorMap().isEmpty()) {
                        throw new ValidationException("errors in search criteria");
                    }

            So if there were errors previous to the method call but the validation was OK an exception will still be thrown. I believe it would be better if the method just checked for errors encountered within the method itself (maybe by a boolean) and then throw
            an exception, allowing for the errorMap to contain errors from previous code.
            Priority Major [ 3 ] Minor [ 4 ]
            jkneal Jerry Neal (Inactive) made changes -
            Link This issue discovered by KFSMI-940 [ KFSMI-940 ]
            jkneal Jerry Neal (Inactive) made changes -
            Fix Version/s 2.3 [ 16595 ]
            Fix Version/s 2.3-backlog [ 16596 ]
            jcoltrin Jessica Coltrin (Inactive) made changes -
            Fix Version/s 2.4 [ 16913 ]
            Fix Version/s 2.3 [ 16595 ]
            jcoltrin Jessica Coltrin (Inactive) made changes -
            Fix Version/s 2.4-backlog [ 16596 ]
            Fix Version/s 2.4 [ 16913 ]
            spatterson Shem Patterson (Inactive) made changes -
            Workflow custom [ 157900 ] Copy of custom for rice [ 207672 ]
            spatterson Shem Patterson (Inactive) made changes -
            Workflow Copy of custom for rice [ 207672 ] custom [ 217420 ]
            spatterson Shem Patterson (Inactive) made changes -
            Workflow custom [ 217420 ] Rice Workflow [ 227168 ]
            jcoltrin Jessica Coltrin (Inactive) made changes -
            Fix Version/s 2.4 [ 16913 ]
            Fix Version/s 2.4-backlog [ 16596 ]
            jcoltrin Jessica Coltrin (Inactive) made changes -
            Fix Version/s Backlog [ 15811 ]
            Fix Version/s 2.4 [ 16913 ]
            ewestfal Eric Westfall made changes -
            Labels Old

              People

              • Assignee:
                Unassigned
                Reporter:
                jkneal Jerry Neal (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated: