Kuali Rice Development
  1. Kuali Rice Development
  2. KULRICE-8034

Business object validation is validating reference objects when it should not

    Details

    • Type: Bug Fix Bug Fix
    • Status: Closed Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.1.1
    • Fix Version/s: 2.1.2
    • Component/s: Development
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Similar issues:
      KULRICE-13198NPE when I subclass a business object
      KULRICE-7369Implement KRMS Reference Object Bindings feature
      KULRICE-9287KualiLookupableTest fails in CI with Lookup not defined for business object class org.kuali.rice.krad.test.document.bo.Account
      KULRICE-1312Create Business Objects for KOM
      KULRICE-3716Create a "Business Object Observer" framework
      KULRICE-6045Add coverage of Externalizable Business Objects to Rice docs
      KULRICE-1551Build KOM business objects
      KULRICE-4736Support for dynamic business objects
      KULRICE-2171Create Implementation classes for KIM Reference objects
      KULRICE-1482Add new Principal business object
    • Rice Module:
      KNS, KRAD
    • KRAD Feature Area:
      Data Dictionary
    • Application Requirement:
      KFS
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required

      Description

      It looks like something changed in the way that validation works on objects and their related child objects in Rice 2.0. Business object validation is apparently validating child objects which are not updatable. I don't know precisely what it was doing before. But, now we have documents failing because the BO-level validation is firing and then blocking the document if there is anything wrong with any of the objects which have been referenced. And, it seems to be running fairly deep, as I've encountered materialization of child objects I would not have expected from a KFS accounting line validation, since the object in question was 3 levels down and not in any way related to any business rules.

      This will be a major problem for implementors, as each chooses to use some fields on objects and not others. Or, they may have loaded data into the tables which will not validate (missing fields which are marked as required - but do not affect day-to-day operations.)

        Issue Links

          Activity

          Hide
          Jonathan Keller added a comment -

          I feel like we are going in circles. The adapter from the validation pattern to the KRAD constraints was something that was worked on a few weeks ago. It needs to be done and for this release. We have 2,200 uses of validation patterns in KFS and we can not change them all right now and then regression test that we made the changes right.

          Show
          Jonathan Keller added a comment - I feel like we are going in circles. The adapter from the validation pattern to the KRAD constraints was something that was worked on a few weeks ago. It needs to be done and for this release. We have 2,200 uses of validation patterns in KFS and we can not change them all right now and then regression test that we made the changes right.
          Hide
          Peter Giles (Inactive) added a comment - - edited

          I don't believe there is an issue left to fix on this ticket. KFS is fine with (and in fact should be using) the KNS DictionaryValidationService. The key outcome here is that now those validations are being run.

          At Bryan and Muddu's request, I'm explaining why certain validation was being missed before when the KRAD DictionaryValidationService was being used. As mentioned, now that the KNS DictionaryValidationService is being used those validations are being run, which is why the issue with the PurchaseOrderDocument.statusChange validation was discovered. On save, the field has a value of "In Process" which doesn't get past the AnyCharacterValidation due to the whitespace. That has since been corrected in the KFS DD.

          Show
          Peter Giles (Inactive) added a comment - - edited I don't believe there is an issue left to fix on this ticket. KFS is fine with (and in fact should be using) the KNS DictionaryValidationService. The key outcome here is that now those validations are being run. At Bryan and Muddu's request, I'm explaining why certain validation was being missed before when the KRAD DictionaryValidationService was being used. As mentioned, now that the KNS DictionaryValidationService is being used those validations are being run, which is why the issue with the PurchaseOrderDocument.statusChange validation was discovered. On save, the field has a value of "In Process" which doesn't get past the AnyCharacterValidation due to the whitespace. That has since been corrected in the KFS DD.
          Hide
          Jonathan Keller added a comment -

          If that's the case then we may be OK as long as what is being validated when we use the KNS validation service is only the primitives on the business object and not the attributes for that business object as listed in the data dictionary.

          Show
          Jonathan Keller added a comment - If that's the case then we may be OK as long as what is being validated when we use the KNS validation service is only the primitives on the business object and not the attributes for that business object as listed in the data dictionary.
          Hide
          Peter Giles (Inactive) added a comment -

          Yes Jonathan, that is the case. To steal your description, the KNS DictionaryValidationService loops over the properties on the BO class.

          Show
          Peter Giles (Inactive) added a comment - Yes Jonathan, that is the case. To steal your description, the KNS DictionaryValidationService loops over the properties on the BO class.
          Hide
          Jessica Coltrin (Inactive) added a comment -

          closing all 2.1.2 Jiras

          Show
          Jessica Coltrin (Inactive) added a comment - closing all 2.1.2 Jiras

            People

            • Assignee:
              Peter Giles (Inactive)
              Reporter:
              Jonathan Keller
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Structure Helper Panel