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

Adding an attachment or note to a people flow maintenance doc doesn't add the attachment

    Details

    • Type: Bug Fix Bug Fix
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.3, 2.4
    • Fix Version/s: 2.3.1
    • Component/s: Development, JPA
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Similar issues:
      KULRICE-10361Adding document notes broken
      KULRICE-12555Rebuild People Flow
      KULRICE-6559People Flow Edit: exception thrown when adding / deleting delegates to people flow members
      KULRICE-14064People Flow does not add an annotation in Route Log
      KULRICE-8048People Flow - Adding roles to a stop allowed without selecting the role
      KULRICE-14134Exception adding attachment in maintenance document
      KULRICE-11861Unable to add attachment after previous attachment was deleted.
      KULRICE-8400JS error in adding note/attachment
      KULRICE-11632AFT Failure Rice Sampleapp Create New PeopleFlow Attachments no longer added
      KULRICE-11785Unable to attach note to Lab - Maintenance - BO Attachment Sample
    • Rice Module:
      KRMS
    • Application Requirement:
      Rice
    • Sprint:
      2.3.1 Sprint 1
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Code Review Status:
      Not Required
    • Include in Release Notes?:
      Yes

      Description

      Create a new peopleflow and attempt to add an attachment or note and when you hit the add button, there's no attachment or note added?

        Issue Links

          Activity

          Hide
          Jonathan Keller added a comment -

          Question: How do I get to peopleflow from the KRAD sampleapp?

          Show
          Jonathan Keller added a comment - Question: How do I get to peopleflow from the KRAD sampleapp?
          Hide
          Kristina Taylor (Inactive) added a comment -

          Not sure on that one. I know this is also reproducible on the Rice sampleapp if you can get that one up and running.

          Show
          Kristina Taylor (Inactive) added a comment - Not sure on that one. I know this is also reproducible on the Rice sampleapp if you can get that one up and running.
          Hide
          Jonathan Keller added a comment -

          There are other problems here. The code below converts all the values to their toString() representations.

          org.kuali.rice.krad.datadictionary.validation.processor.ValidCharactersConstraintProcessor.doProcessFormattableValidCharConstraint(DictionaryValidationResult, ValidCharactersConstraint, Formatable, Object, AttributeValueReader)
                  // This is a strange KNS thing for validating searchable fields -- they sometimes come in a date range format, for example 2/12/2010..2/14/2010, and need to be split up
                  List<String> parsedAttributeValues = attributeValueReader.getCleanSearchableValues(attributeName);
          
          org.kuali.rice.krad.datadictionary.validation.BaseAttributeValueReader.getCleanSearchableValues(String)
              public List<String> getCleanSearchableValues(String attributeKey) throws AttributeValidationException {
                  Class<?> attributeType = getType(attributeKey);
                  Object rawValue = getValue(attributeKey);
          
                  String attributeInValue = rawValue != null ? rawValue.toString() : "";
                  String attributeDataType = DataTypeUtil.determineDataType(attributeType);
                  return SQLUtils.getCleanedSearchableValues(attributeInValue, attributeDataType);
              }
          

          This means that this code will never fire for the first half of the if statement. It looks like something was added for KNS compatibility which is performing data conversions to strings ahead of when it should be.

          org.kuali.rice.krad.datadictionary.validation.processor.ValidCharactersConstraintProcessor.doProcessValidCharConstraint(ValidCharactersConstraint, Object)
                  if (value instanceof java.sql.Date) {
                      fieldValue.append(getDateTimeService().toDateString((java.sql.Date) value));
                  } else {
                      fieldValue.append(ValidationUtils.getString(value));
                  }
          
          Show
          Jonathan Keller added a comment - There are other problems here. The code below converts all the values to their toString() representations. org.kuali.rice.krad.datadictionary.validation.processor.ValidCharactersConstraintProcessor.doProcessFormattableValidCharConstraint(DictionaryValidationResult, ValidCharactersConstraint, Formatable, Object, AttributeValueReader) // This is a strange KNS thing for validating searchable fields -- they sometimes come in a date range format, for example 2/12/2010..2/14/2010, and need to be split up List< String > parsedAttributeValues = attributeValueReader.getCleanSearchableValues(attributeName); org.kuali.rice.krad.datadictionary.validation.BaseAttributeValueReader.getCleanSearchableValues(String) public List< String > getCleanSearchableValues( String attributeKey) throws AttributeValidationException { Class <?> attributeType = getType(attributeKey); Object rawValue = getValue(attributeKey); String attributeInValue = rawValue != null ? rawValue.toString() : ""; String attributeDataType = DataTypeUtil.determineDataType(attributeType); return SQLUtils.getCleanedSearchableValues(attributeInValue, attributeDataType); } This means that this code will never fire for the first half of the if statement. It looks like something was added for KNS compatibility which is performing data conversions to strings ahead of when it should be. org.kuali.rice.krad.datadictionary.validation.processor.ValidCharactersConstraintProcessor.doProcessValidCharConstraint(ValidCharactersConstraint, Object) if (value instanceof java.sql.Date) { fieldValue.append(getDateTimeService().toDateString((java.sql.Date) value)); } else { fieldValue.append(ValidationUtils.getString(value)); }
          Hide
          Jonathan Keller added a comment -

          I did just check in a change to the defaulting such that it should not add the patterns to non-editable fields. It hasn't helped the document - so there may be something else going on. But, I'm out of time for today.

          Show
          Jonathan Keller added a comment - I did just check in a change to the defaulting such that it should not add the patterns to non-editable fields. It hasn't helped the document - so there may be something else going on. But, I'm out of time for today.
          Hide
          Jonathan Keller added a comment -

          BTW - new problem once I fix this (hacked a fix into the debugger)

          java.lang.UnsupportedOperationException: retrieveNonKeyFields not supported in KRAD
          at org.kuali.rice.krad.service.impl.KRADLegacyDataAdapterImpl.retrieveNonKeyFields(KRADLegacyDataAdapterImpl.java:196)
          at org.kuali.rice.krad.service.impl.LegacyDataAdapterImpl.retrieveNonKeyFields(LegacyDataAdapterImpl.java:110)
          at org.kuali.rice.krad.service.impl.LegacyAppFrameworkAdapterServiceImpl.refresh(LegacyAppFrameworkAdapterServiceImpl.java:43)
          at org.kuali.rice.krad.bo.PersistableBusinessObjectBase.refresh(PersistableBusinessObjectBase.java:321)
          
          Show
          Jonathan Keller added a comment - BTW - new problem once I fix this (hacked a fix into the debugger) java.lang.UnsupportedOperationException: retrieveNonKeyFields not supported in KRAD at org.kuali.rice.krad.service.impl.KRADLegacyDataAdapterImpl.retrieveNonKeyFields(KRADLegacyDataAdapterImpl.java:196) at org.kuali.rice.krad.service.impl.LegacyDataAdapterImpl.retrieveNonKeyFields(LegacyDataAdapterImpl.java:110) at org.kuali.rice.krad.service.impl.LegacyAppFrameworkAdapterServiceImpl.refresh(LegacyAppFrameworkAdapterServiceImpl.java:43) at org.kuali.rice.krad.bo.PersistableBusinessObjectBase.refresh(PersistableBusinessObjectBase.java:321)

            People

            • Assignee:
              Jonathan Keller
              Reporter:
              Matt Sargent
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 day
                1d
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day
                1d

                  Agile

                    Structure Helper Panel