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

Inquiry - Support for displaying bo attachments and downloading

    Details

    • Type: Task Task
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.5
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Similar issues:
      KULRICE-10261Inquiry download custom BO attachments, KRAD support
      KULRICE-10571Inquiry download custom BO attachments, KRAD support
      KULRICE-10211Inquiry Gap Analysis: Downloading attachments linked to BOs
      KULRICE-7227NPE when trying to download multi-attachment from document that hasn't been routed/saved.
      KULRICE-10011Cannot download note attachments on documents
      KULRICE-12795Not able to download attachments in KRAD
      KULRICE-7280After downloading an attachment, exception is thrown on any action
      KULRICE-9487Inquiry export button does not open file download dialog
      KULRICE-2455Direct Inquiry for lookup field other than BO PK results in server error
      KULRICE-4905Display appropriate icon based on attachment type in Maintenance Documents
    • Rice Module:
      KRAD
    • KRAD Feature Area:
      Inquiry, Maintenance
    • Sprint:
      Core 2.5.0-m6 Sprint 2
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Include in Release Notes?:
      Yes
    • Story Points:
      13

      Description

      As a user of inquiries, I want to be able to see and download attachments from the inquiry view (both attachments associated with the doc and those associated with the BO), so that I can access the attachments without having to edit the doc.

      Inquiries in KRAD need support for displaying bo attachments on the inquiry and allowing them to be downloaded.

      There are two ways of downloading attachments from inquiries: from something of type PersistableAttachment or PersistableAttachmentList, and from custom parameters. The KNS code for the first can be found in KualiInquiryAction.downloadAttachment, and the KNS code for the second can be found in KualiInquiryAction.downloadCustomBOAttachment. The first is very much like what we do with maintenance documents, as seen in MaintenanceDocumentControllerServiceImpl. The second just takes raw parameters and allows the download based on those parameters.

      These two methods need to be integrated into the InquiryController and InquiryControllerServiceImpl just like they are in maintenance. The first method should be renamed to downloadDataObjectAttachment and the second method should be renamed to downloadCustomDataObjectAttachment for consistency. We should probably keep these separate for now.

      Also update the KNS2KRAD upgrade guide to show how to convert KNS to KRAD. Create a pre-commit code review as well.

        Issue Links

          Activity

          Jessica Coltrin (Inactive) made changes -
          Field Original Value New Value
          Rice Lead sgibson
          Hide
          Jessica Coltrin (Inactive) added a comment -

          double-tagging with 2.0.0-b3 for review.

          Show
          Jessica Coltrin (Inactive) added a comment - double-tagging with 2.0.0-b3 for review.
          Jessica Coltrin (Inactive) made changes -
          Fix Version/s 2.0.0-b3 [ 16375 ]
          Jessica Coltrin (Inactive) made changes -
          Start Date
          Fix Date 2011-12-05 [ set to sprint end date ]
          Scott Gibson (Inactive) made changes -
          Fix Version/s 2.0.0-b4 [ 16376 ]
          Fix Version/s 2.0.0-b3 [ 16375 ]
          Scott Gibson (Inactive) made changes -
          Start Date
          Fix Date 2011-12-05 2011-12-19 [ set to sprint end date ]
          Scott Gibson (Inactive) made changes -
          Fix Version/s 2.1 [ 15812 ]
          Fix Version/s 2.0 [ 14190 ]
          Fix Version/s 2.0.0-b4 [ 16376 ]
          Scott Gibson (Inactive) made changes -
          Start Date
          Fix Date 2011-12-19 [ set to sprint end date ]
          Jessica Coltrin (Inactive) made changes -
          Fix Version/s 2.2 [ 16411 ]
          Fix Version/s 2.1 [ 15812 ]
          Jessica Coltrin (Inactive) made changes -
          Start Date
          Fix Date [ set to sprint end date ]
          Jerry Neal (Inactive) made changes -
          Rice Lead sgibson jkneal
          Jessica Coltrin (Inactive) made changes -
          Fix Version/s 2.2-backlog [ 16475 ]
          Jessica Coltrin (Inactive) made changes -
          Start Date
          Fix Date [ set to sprint end date ]
          Jessica Coltrin (Inactive) made changes -
          Fix Version/s 2.2.1 [ 16733 ]
          Fix Version/s 2.2 [ 16411 ]
          Fix Version/s 2.2-backlog [ 16475 ]
          Matt Sargent made changes -
          Link This issue relates to KRRM-144 [ KRRM-144 ]
          Jessica Coltrin (Inactive) made changes -
          Fix Version/s 2.3-backlog [ 16596 ]
          Fix Version/s 2.2.1 [ 16733 ]
          Claus Niesen made changes -
          Rice Lead jkneal cniesen
          Jerry Neal (Inactive) made changes -
          Summary Inquiry - Support for displaying bo attachments and downloading Inquiry/Maintenance - Support for displaying bo attachments and downloading
          Description Inquiries in KRAD need support for displaying bo attachments on the inquiry and allowing them to be downloaded.

          Analysis needs to be done with the KNS inquiries to determine the requirements.
          Inquiries in KRAD need support for displaying bo attachments on the inquiry and allowing them to be downloaded.

          Analysis needs to be done with the KNS inquiries to determine the requirements.

          In addition bo attachments for KRAD maintenance documents need reworked. Currently using the Struts FormFile object, which will need to be the Spring MultipartFile.
          Jerry Neal (Inactive) made changes -
          Link This issue cloned to KULRICE-8744 [ KULRICE-8744 ]
          Claus Niesen made changes -
          Link This issue is duplicated by KULRICE-8052 [ KULRICE-8052 ]
          Matt Sargent made changes -
          Component/s Roadmap [ 13903 ]
          Claus Niesen made changes -
          Fix Version/s 2.3 [ 16595 ]
          Fix Version/s 2.3.0-m1 [ 16756 ]
          Fix Version/s 2.3.0-m2 [ 16757 ]
          Fix Version/s 2.3-backlog [ 16596 ]
          Claus Niesen made changes -
          KRAD Feature Area Inquiry,Maintenance [ 14291,14292 ]
          Claus Niesen made changes -
          Rank Ranked lower
          Claus Niesen made changes -
          Fix Version/s 2.3.0-m1 [ 16756 ]
          Grant Trudel (Inactive) made changes -
          Include in Release Notes? Yes [ 14658 ]
          Claus Niesen made changes -
          Link This issue discovered by KULRICE-9439 [ KULRICE-9439 ]
          Claus Niesen made changes -
          Fix Version/s 2.4.0-m1 [ 17035 ]
          Fix Version/s 2.4 [ 16913 ]
          Fix Version/s 2.3 [ 16595 ]
          Fix Version/s 2.3.0-m2 [ 16757 ]
          Jessica Coltrin (Inactive) made changes -
          Rank Ranked higher
          Jessica Coltrin (Inactive) made changes -
          Epic Link KULRICE-9439 [ 114708 ]
          Jessica Coltrin (Inactive) made changes -
          Rank Ranked higher
          Claus Niesen made changes -
          Rank Ranked lower
          Jessica Coltrin (Inactive) made changes -
          Fix Version/s 2.4.0-m1 [ 17035 ]
          Shem Patterson (Inactive) made changes -
          Workflow custom [ 100693 ] Copy of custom for rice [ 207082 ]
          Shem Patterson (Inactive) made changes -
          Workflow Copy of custom for rice [ 207082 ] custom [ 216830 ]
          Shem Patterson (Inactive) made changes -
          Workflow custom [ 216830 ] Rice Workflow [ 226578 ]
          Claus Niesen made changes -
          Assignee Kristina Taylor [ kbtaylor ]
          Claus Niesen made changes -
          Rank Ranked higher
          Kristina Taylor (Inactive) made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Kristina Taylor (Inactive) made changes -
          Link This issue relies on KULRICE-10455 [ KULRICE-10455 ]
          Hide
          Kristina Taylor (Inactive) added a comment -

          I'm not really sure this was ever really used anywhere or even properly implemented. I couldn't find any examples in Fisheye in Inquiries specifically, and I couldn't find how it could work in the KNS. I think this is perhaps a desired feature in the long run but it may not be as critical as others. It would be easier to actually implement this feature after fixing KULRICE-10455 since all the data objects would be linked up in an example.

          Show
          Kristina Taylor (Inactive) added a comment - I'm not really sure this was ever really used anywhere or even properly implemented. I couldn't find any examples in Fisheye in Inquiries specifically, and I couldn't find how it could work in the KNS. I think this is perhaps a desired feature in the long run but it may not be as critical as others. It would be easier to actually implement this feature after fixing KULRICE-10455 since all the data objects would be linked up in an example.
          Kristina Taylor (Inactive) made changes -
          Status In Progress [ 3 ] Open [ 1 ]
          Kristina Taylor (Inactive) made changes -
          Assignee Kristina Taylor [ kbtaylor ]
          Jessica Coltrin (Inactive) made changes -
          Sprint 2.4.0-m2 KRAD Sprint 4 [ 92 ]
          Peter Giles (Inactive) made changes -
          Sprint 2.4.0-m2 KRAD Sprint 4 [ 92 ]
          Claus Niesen made changes -
          Fix Version/s 2.5 [ 17044 ]
          Fix Version/s 2.4 [ 16913 ]
          Claus Niesen made changes -
          Epic Link KULRICE-9439 [ 114708 ]
          Claus Niesen made changes -
          Component/s KNS Equivalency [ 13684 ]
          Claus Niesen made changes -
          Original Estimate 3 days [ 86400 ]
          Claus Niesen made changes -
          Remaining Estimate 3 days [ 86400 ]
          Claus Niesen made changes -
          Sprint 2.5 KNS Equiv - m6 [ 252 ]
          Claus Niesen made changes -
          Rank Ranked lower
          Claus Niesen made changes -
          Sprint 2.5 KNS Equiv - m6 [ 252 ]
          Claus Niesen made changes -
          Rank Ranked lower
          Claus Niesen made changes -
          Sprint 2.5 KNS Equiv - m7 [ 254 ]
          Claus Niesen made changes -
          Rank Ranked higher
          Claus Niesen made changes -
          Sprint 2.5 KNS Equiv - m7 [ 254 ] 2.5 KNS Equiv - m5 [ 251 ]
          Claus Niesen made changes -
          Sprint 2.5 KNS Equiv - m4 [ 251 ] 2.5 KNS Equiv - m5 [ 252 ]
          Claus Niesen made changes -
          Sprint 2.5 KNS Equiv - m5 [ 252 ]
          Kristina Taylor (Inactive) made changes -
          Assignee Kristina Taylor [ kbtaylor ]
          Kristina Taylor (Inactive) made changes -
          Rank Ranked higher
          Kristina Taylor (Inactive) made changes -
          Rank Ranked higher
          Hide
          Kristina Taylor (Inactive) added a comment -

          See additional comments on KULRICE-12964.

          Show
          Kristina Taylor (Inactive) added a comment - See additional comments on KULRICE-12964 .
          Kristina Taylor (Inactive) made changes -
          Description Inquiries in KRAD need support for displaying bo attachments on the inquiry and allowing them to be downloaded.

          Analysis needs to be done with the KNS inquiries to determine the requirements.

          In addition bo attachments for KRAD maintenance documents need reworked. Currently using the Struts FormFile object, which will need to be the Spring MultipartFile.
          Inquiries in KRAD need support for displaying bo attachments on the inquiry and allowing them to be downloaded.

          Analysis needs to be done with the KNS inquiries to determine the requirements.
          Kristina Taylor (Inactive) made changes -
          Summary Inquiry/Maintenance - Support for displaying bo attachments and downloading Inquiry - Support for displaying bo attachments and downloading
          Kristina Taylor (Inactive) made changes -
          Description Inquiries in KRAD need support for displaying bo attachments on the inquiry and allowing them to be downloaded.

          Analysis needs to be done with the KNS inquiries to determine the requirements.
          Inquiries in KRAD need support for displaying bo attachments on the inquiry and allowing them to be downloaded.

          There are two ways of downloading attachments from inquiries: from something of type {{PersistableAttachment}} or {{PersistableAttachmentList}}, and from custom parameters. The KNS code for the first can be found in {{KualiInquiryAction.downloadAttachment}}, and the KNS code for the second can be found in {{KualiInquiryAction.downloadCustomBOAttachment}}. The first is very much like what we do with maintenance documents, as seen in {{MaintenanceDocumentControllerServiceImpl}}. The second just takes raw parameters and allows the download based on those parameters.

          These two methods need to be integrated into the {{InquiryController}} and {{InquiryControllerServiceImpl}} just like they are in maintenance. The first method should be renamed to {{downloadDataObjectAttachment}} and the second method should be renamed to {{downloadCustomDataObjectAttachment}} for consistency. We should probably keep these separate for now.

          Also update the KNS2KRAD upgrade guide to show how to convert KNS to KRAD. Create a pre-commit code review as well.
          Kristina Taylor (Inactive) made changes -
          Assignee Kristina Taylor [ kbtaylor ]
          Peter Giles (Inactive) made changes -
          Description Inquiries in KRAD need support for displaying bo attachments on the inquiry and allowing them to be downloaded.

          There are two ways of downloading attachments from inquiries: from something of type {{PersistableAttachment}} or {{PersistableAttachmentList}}, and from custom parameters. The KNS code for the first can be found in {{KualiInquiryAction.downloadAttachment}}, and the KNS code for the second can be found in {{KualiInquiryAction.downloadCustomBOAttachment}}. The first is very much like what we do with maintenance documents, as seen in {{MaintenanceDocumentControllerServiceImpl}}. The second just takes raw parameters and allows the download based on those parameters.

          These two methods need to be integrated into the {{InquiryController}} and {{InquiryControllerServiceImpl}} just like they are in maintenance. The first method should be renamed to {{downloadDataObjectAttachment}} and the second method should be renamed to {{downloadCustomDataObjectAttachment}} for consistency. We should probably keep these separate for now.

          Also update the KNS2KRAD upgrade guide to show how to convert KNS to KRAD. Create a pre-commit code review as well.
          As a user of inquiries, I want to be able to see and download attachments from the inquiry view (both attachments associated with the doc and those associated with the BO), so that I can access the attachments without having to edit the doc.

          Inquiries in KRAD need support for displaying bo attachments on the inquiry and allowing them to be downloaded.

          There are two ways of downloading attachments from inquiries: from something of type {{PersistableAttachment}} or {{PersistableAttachmentList}}, and from custom parameters. The KNS code for the first can be found in {{KualiInquiryAction.downloadAttachment}}, and the KNS code for the second can be found in {{KualiInquiryAction.downloadCustomBOAttachment}}. The first is very much like what we do with maintenance documents, as seen in {{MaintenanceDocumentControllerServiceImpl}}. The second just takes raw parameters and allows the download based on those parameters.

          These two methods need to be integrated into the {{InquiryController}} and {{InquiryControllerServiceImpl}} just like they are in maintenance. The first method should be renamed to {{downloadDataObjectAttachment}} and the second method should be renamed to {{downloadCustomDataObjectAttachment}} for consistency. We should probably keep these separate for now.

          Also update the KNS2KRAD upgrade guide to show how to convert KNS to KRAD. Create a pre-commit code review as well.
          Kristina Taylor (Inactive) made changes -
          Original Estimate 3 days [ 86400 ]
          Remaining Estimate 3 days [ 86400 ]
          Kristina Taylor (Inactive) made changes -
          Rank Ranked higher
          Kristina Taylor (Inactive) made changes -
          Story Points 13
          Kristina Taylor (Inactive) made changes -
          Sprint Core 2.5.0-m6 Sprint 2 [ 371 ]
          Kristina Taylor (Inactive) made changes -
          Rank Ranked higher
          Shannon Hess made changes -
          Assignee Shannon Hess [ shahess ]
          Shannon Hess made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Shannon Hess logged work - 14/Aug/14 6:03 PM
          • Time Spent:
            4 hours
             
            Investigated how this works on KNS. Got it mostly working on KRAD but I need to work out the bugs, test collection attachments, create an AFT, and create documentation.
          Shannon Hess made changes -
          Remaining Estimate 0 minutes [ 0 ]
          Time Spent 4 hours [ 14400 ]
          Worklog Id 98464 [ 98464 ]
          Hide
          Shannon Hess added a comment - - edited

          From work log: Investigated how this works on KNS. Got it mostly working on KRAD but I need to work out the bugs, test collection attachments, create an AFT, and create documentation.

          Attaching the inquiry screen with a download. The description does not like the word "I'm"

          Show
          Shannon Hess added a comment - - edited From work log: Investigated how this works on KNS. Got it mostly working on KRAD but I need to work out the bugs, test collection attachments, create an AFT, and create documentation. Attaching the inquiry screen with a download. The description does not like the word "I'm"
          Shannon Hess made changes -
          Attachment Inquiry screen with download.jpg [ 84995 ]
          Shannon Hess made changes -
          Original Estimate 2 days [ 57600 ]
          Remaining Estimate 0 minutes [ 0 ] 1 day, 4 hours [ 43200 ]
          Hide
          Shannon Hess added a comment -

          I've created a fisheye review for Kristina, Jerry, and Dan. https://fisheye.kuali.org/cru/rice-473 I left it open in case anyone else would like to view the changes.

          Still left todo: update the KNS2KRAD upgrade guide to show how to convert KNS to KRAD.

          Show
          Shannon Hess added a comment - I've created a fisheye review for Kristina, Jerry, and Dan. https://fisheye.kuali.org/cru/rice-473 I left it open in case anyone else would like to view the changes. Still left todo: update the KNS2KRAD upgrade guide to show how to convert KNS to KRAD.
          Hide
          Shannon Hess added a comment -

          To test downloadCustomDataObjectAttachment I created a second inquiry view called customDataObject for LabsTravelAttachment. It passes the fileName, contentType, and fileContentDataObjectField when the "download custom attachment" button is selected.

          Link to Inquiry Test view - http://localhost:8080/krad-dev/kr-krad/kradsampleapp?viewId=KradInquirySample-PageR6C3

          Altered inquiry link to test downloadCustomDataObjectAttachment code - http://localhost:8080/krad-dev/kr-krad/inquiry?travelAttachmentGroupNumber=123&methodToCall=start&dataObjectClassName=org.kuali.rice.krad.labs.LabsTravelAttachment&id=attachment14085ay561744&viewName=customDataObject

          <bean id="TravelAttachmentCustomSample-inquiryDefinition" parent="Uif-InquiryView">
              <property name="title" value="Travel Attachment Inquiry"/>
              <property name="dataObjectClassName" value="org.kuali.rice.krad.labs.LabsTravelAttachment"/>
              <property name="viewName" value="customDataObject"/>
              <property name="items">
                <list>
                  <bean parent="Uif-Disclosure-GridSection">
                    <property name="headerText" value="Travel Attachment"/>
                    <property name="items">
                      <list>
                        <bean parent="Uif-DataField" p:propertyName="id"/>
                        <bean parent="Uif-DataField" p:propertyName="travelAttachmentGroupNumber"/>
                        <bean parent="Uif-DataField" p:propertyName="description"/>
                        <bean parent="Uif-VerticalFieldGroup" p:label="Attached File">
                          <property name="items">
                            <list>
                              <bean parent="Uif-DataField" p:labelRendered="false" p:propertyName="fileName"/>
                              <bean parent="Uif-PrimaryActionButton-Small" p:methodToCall="downloadCustomDataObjectAttachment"
                                    p:ajaxSubmit="false" p:actionLabel="download custom attachment"
                                    p:title="download custom attachment" p:disableBlocking="true">
                                  <property name="additionalSubmitData">
                                    <map>
                                      <entry key="fileName" value="@{#dp.fileName}"/>
                                      <entry key="contentType" value="@{#dp.contentType}"/>
                                      <entry key="fileContentDataObjectField" value="attachmentContent"/>
                                    </map>
                                  </property>
                              </bean>
                            </list>
                          </property>
                        </bean>
                      </list>
                    </property>
                  </bean>
                </list>
              </property>
            </bean>
          
          Show
          Shannon Hess added a comment - To test downloadCustomDataObjectAttachment I created a second inquiry view called customDataObject for LabsTravelAttachment. It passes the fileName, contentType, and fileContentDataObjectField when the "download custom attachment" button is selected. Link to Inquiry Test view - http://localhost:8080/krad-dev/kr-krad/kradsampleapp?viewId=KradInquirySample-PageR6C3 Altered inquiry link to test downloadCustomDataObjectAttachment code - http://localhost:8080/krad-dev/kr-krad/inquiry?travelAttachmentGroupNumber=123&methodToCall=start&dataObjectClassName=org.kuali.rice.krad.labs.LabsTravelAttachment&id=attachment14085ay561744&viewName=customDataObject <bean id= "TravelAttachmentCustomSample-inquiryDefinition" parent= "Uif-InquiryView" > <property name= "title" value= "Travel Attachment Inquiry" /> <property name= "dataObjectClassName" value= "org.kuali.rice.krad.labs.LabsTravelAttachment" /> <property name= "viewName" value= "customDataObject" /> <property name= "items" > <list> <bean parent= "Uif-Disclosure-GridSection" > <property name= "headerText" value= "Travel Attachment" /> <property name= "items" > <list> <bean parent= "Uif-DataField" p:propertyName= "id" /> <bean parent= "Uif-DataField" p:propertyName= "travelAttachmentGroupNumber" /> <bean parent= "Uif-DataField" p:propertyName= "description" /> <bean parent= "Uif-VerticalFieldGroup" p:label= "Attached File" > <property name= "items" > <list> <bean parent= "Uif-DataField" p:labelRendered= " false " p:propertyName= "fileName" /> <bean parent= "Uif-PrimaryActionButton-Small" p:methodToCall= "downloadCustomDataObjectAttachment" p:ajaxSubmit= " false " p:actionLabel= "download custom attachment" p:title= "download custom attachment" p:disableBlocking= " true " > <property name= "additionalSubmitData" > <map> <entry key= "fileName" value= "@{#dp.fileName}" /> <entry key= "contentType" value= "@{#dp.contentType}" /> <entry key= "fileContentDataObjectField" value= "attachmentContent" /> </map> </property> </bean> </list> </property> </bean> </list> </property> </bean> </list> </property> </bean>
          Shannon Hess made changes -
          Status In Progress [ 3 ] Open [ 1 ]
          Hide
          Shannon Hess added a comment -
          Show
          Shannon Hess added a comment - The tests failed in CI due to me not switching back to the needed file location – I've committed the fix for that. Here is the location of the tests for future reference: https://ci.kuali.org/view/rice/view/2.5/view/list/job/rice-2.5-test-functional-env14-jenkins-krad-sampleapp/lastCompletedBuild/testReport/junit/org.kuali.rice.krad.labs.maintenance/LabsMaintenanceBOAttachmentAft/ https://ci.kuali.org/view/rice/view/2.5/view/list/job/rice-2.5-test-functional-env14-jenkins-krad-sampleapp/lastCompletedBuild/testReport/junit/org.kuali.rice.krad.labs.inquiries/LabsInquiryDataObjectAttachmentAft/ I'm going to go ahead and close this issue, but I'll still verify the tests pass during their next CI run.
          Shannon Hess made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Shannon Hess logged work - 26/Aug/14 4:24 AM
          • Time Spent:
            1 day, 6 hours
             
            worked out the bugs, tested collection attachments, wrote the code for the custom attachments, tested custom attachments, created an AFT, created a code review, made suggested updates, and created documentation.
          Shannon Hess made changes -
          Remaining Estimate 1 day, 4 hours [ 43200 ] 0 minutes [ 0 ]
          Time Spent 4 hours [ 14400 ] 2 days, 2 hours [ 64800 ]
          Worklog Id 98649 [ 98649 ]
          Matt Sargent made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Shannon Hess
              Reporter:
              Jerry Neal (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 2 days Original Estimate - 2 days
                2d
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 days, 2 hours
                2d 2h

                  Agile

                    Structure Helper Panel