[KULRICE-5363] Inquiry - Support for displaying bo attachments and downloading Created: 14/Jul/11  Updated: 24/Sep/14  Resolved: 26/Aug/14

Status: Closed
Project: Kuali Rice Development
Component/s: Development, KNS Equivalency, Roadmap
Affects Version/s: None
Fix Version/s: 2.5
Security Level: Public (Public: Anyone can view)

Type: Task Priority: Major
Reporter: Jerry Neal (Inactive) Assignee: Shannon Hess
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0 minutes
Time Spent: 2 days, 2 hours
Original Estimate: 2 days

Attachments: JPEG File Inquiry screen with download.jpg    
Issue Links:
cloned to KULRICE-8744 Using stacked layout manager if you j... Open
discovered by KULRICE-9439 KNS/KRAD Equivalence for Inquiry Closed
is duplicated by KULRICE-8052 Update file control when readonly Closed
relates to KRRM-144 KRAD Equivalency with KNS Open
relies on KULRICE-10455 Support for retrieving attachments wh... Closed
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 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?:
Story Points: 13


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.

Comment by Jessica Coltrin (Inactive) [ 08/Nov/11 ]

double-tagging with 2.0.0-b3 for review.

Comment by Kristina Taylor (Inactive) [ 01/Oct/13 ]

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.

Comment by Kristina Taylor (Inactive) [ 17/Jul/14 ]

See additional comments on KULRICE-12964.

Comment by Shannon Hess [ 14/Aug/14 ]

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"

Comment by Shannon Hess [ 21/Aug/14 ]

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.

Comment by Shannon Hess [ 21/Aug/14 ]

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">
        <bean parent="Uif-Disclosure-GridSection">
          <property name="headerText" value="Travel Attachment"/>
          <property name="items">
              <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">
                    <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">
                            <entry key="fileName" value="@{#dp.fileName}"/>
                            <entry key="contentType" value="@{#dp.contentType}"/>
                            <entry key="fileContentDataObjectField" value="attachmentContent"/>
Comment by Shannon Hess [ 26/Aug/14 ]

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:



I'm going to go ahead and close this issue, but I'll still verify the tests pass during their next CI run.

Generated at Thu Jul 02 07:01:13 CDT 2020 using JIRA 6.1.5#6160-sha1:a61a0fc278117a0da0ec9b89167b8f29b6afdab2.