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

Support for retrieving attachments which have been linked to properties on the business object itself

    Details

    • Type: Bug Fix
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.4
    • Component/s: Development
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Rice Module:
      KRAD
    • Sprint:
      2.4.0-m2 KRAD Sprint 4, 2.4.0-m3 KRAD Sprint 1
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Code Review Status:
      Not Required
    • Include in Release Notes?:
      Yes

      Description

      Convert KNS functionality to retrieve attachments that are linked to a BO property. You probably just need to convert struts file form to spring for populateDocumentAttachment() in MaintenanceDocumentBase. A sample of the KNS functionality is at https://jira.kuali.org/browse/KULRICE-5130.

        Attachments

          Issue Links

            Activity

            jruch Jeff Ruch created issue -
            jruch Jeff Ruch made changes -
            Field Original Value New Value
            Link This issue relates to KULRICE-5130 [ KULRICE-5130 ]
            Hide
            jruch Jeff Ruch added a comment -

            This is a good example of the functionality in KNS

            Show
            jruch Jeff Ruch added a comment - This is a good example of the functionality in KNS
            Hide
            jruch Jeff Ruch added a comment -

            Note there are two types of attachments (PersistableAttachment and PersistableAttachmentList).

            Show
            jruch Jeff Ruch added a comment - Note there are two types of attachments (PersistableAttachment and PersistableAttachmentList).
            jruch Jeff Ruch made changes -
            Link This issue is related to KULRICE-10456 [ KULRICE-10456 ]
            jruch Jeff Ruch made changes -
            Link This issue relates to KULRICE-10463 [ KULRICE-10463 ]
            jruch Jeff Ruch made changes -
            Link This issue relates to KULRICE-10463 [ KULRICE-10463 ]
            gilesp Peter Giles (Inactive) made changes -
            Fix Version/s 2.4 [ 16913 ]
            Fix Version/s 2.3.1 [ 17053 ]
            kbtaylor Kristina Taylor (Inactive) made changes -
            Link This issue is relied upon by KULRICE-5363 [ KULRICE-5363 ]
            Hide
            kbtaylor Kristina Taylor (Inactive) added a comment -

            I was working on attachments for another issue and adapted this example for an attachment maintenance document. The patch should help jumpstart this issue.

            Show
            kbtaylor Kristina Taylor (Inactive) added a comment - I was working on attachments for another issue and adapted this example for an attachment maintenance document. The patch should help jumpstart this issue.
            kbtaylor Kristina Taylor (Inactive) made changes -
            Attachment KULRICE-10455.patch [ 72476 ]
            gilesp Peter Giles (Inactive) made changes -
            Original Estimate 1 day, 4 hours [ 43200 ]
            Remaining Estimate 1 day, 4 hours [ 43200 ]
            gilesp Peter Giles (Inactive) made changes -
            Sprint 2.4.0-m2 KRAD Sprint 4 [ 92 ]
            gilesp Peter Giles (Inactive) made changes -
            Rank Ranked lower
            jruch Jeff Ruch made changes -
            Assignee Jeff Ruch [ jruch ]
            jruch Jeff Ruch made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            jruch Jeff Ruch logged work - 15/Oct/13 11:13 AM
            • Time Spent:
              2 days, 4 hours
               
              <No comment>
            jruch Jeff Ruch made changes -
            Remaining Estimate 1 day, 4 hours [ 43200 ] 0 minutes [ 0 ]
            Time Spent 2 days, 4 hours [ 72000 ]
            Worklog Id 89416 [ 89416 ]
            jruch Jeff Ruch made changes -
            Original Estimate 1 day, 4 hours [ 43200 ] 4 days [ 115200 ]
            Hide
            jruch Jeff Ruch added a comment -

            Converted all fileForm to multiPartFiles.

            Show
            jruch Jeff Ruch added a comment - Converted all fileForm to multiPartFiles.
            Hide
            jruch Jeff Ruch added a comment -

            JPA breaks existing implementation (including KNS). Need to remove refreshAttachment and refreshAttachmentList from MaintenanceDocumentBase to resolve.

            Show
            jruch Jeff Ruch added a comment - JPA breaks existing implementation (including KNS). Need to remove refreshAttachment and refreshAttachmentList from MaintenanceDocumentBase to resolve.
            jcoltrin Jessica Coltrin (Inactive) made changes -
            Rank Ranked higher
            jcoltrin Jessica Coltrin (Inactive) made changes -
            Sprint 2.4.0-m2 KRAD Sprint 4 [ 92 ] 2.4.0-m2 KRAD Sprint 4, 2.4.0-m3 KRAD Sprint 1 [ 92, 99 ]
            Hide
            jruch Jeff Ruch added a comment -

            BO Attachments Sample

            Show
            jruch Jeff Ruch added a comment - BO Attachments Sample
            jruch Jeff Ruch made changes -
            Attachment AttachmentSample.patch [ 73148 ]
            jruch Jeff Ruch logged work - 19/Oct/13 1:30 AM
            • Time Spent:
              1 day, 4 hours
               
              Removed changes that matched functionality of KNS. Ended up overriding downloadBOAttachment method. Tested with sample (attached) both BO and regular attachments that are linked to a note.
            jruch Jeff Ruch made changes -
            Time Spent 2 days, 4 hours [ 72000 ] 4 days [ 115200 ]
            Worklog Id 89577 [ 89577 ]
            Hide
            jruch Jeff Ruch added a comment -

            Sample attached. Notice that the main issue with attachments is that the multiPartFile needs to be converted into file name, content type, and byte[]. The easiest way to do this is in the BO (as you can see in the sample). Once a multiPartFile attachmentFile is set, the BO sets the relevant fields so that it can be saved in the data.

            For downloads, the old KNS action used a downloadAttachment method. This method was flawed because it could not support documents with both attachments and bo attachments. In order to fix that, I overrode the downloadBOAttachment method on the maintenance document controller.

            Show
            jruch Jeff Ruch added a comment - Sample attached. Notice that the main issue with attachments is that the multiPartFile needs to be converted into file name, content type, and byte[]. The easiest way to do this is in the BO (as you can see in the sample). Once a multiPartFile attachmentFile is set, the BO sets the relevant fields so that it can be saved in the data. For downloads, the old KNS action used a downloadAttachment method. This method was flawed because it could not support documents with both attachments and bo attachments. In order to fix that, I overrode the downloadBOAttachment method on the maintenance document controller.
            jruch Jeff Ruch made changes -
            Status In Progress [ 3 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            jruch Jeff Ruch made changes -
            Attachment AttachmentSample.patch [ 73148 ]
            Hide
            jruch Jeff Ruch added a comment -

            BO Attachment sample

            Show
            jruch Jeff Ruch added a comment - BO Attachment sample
            jruch Jeff Ruch made changes -
            Attachment AttachmentSample1.patch [ 73151 ]
            jcoltrin Jessica Coltrin (Inactive) made changes -
            Status Resolved [ 5 ] Closed [ 6 ]

              People

              • Assignee:
                jruch Jeff Ruch
                Reporter:
                jruch Jeff Ruch
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 4 days
                  4d
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 days
                  4d