fix: documents do not follow display document preferences#344
Merged
yingbull merged 3 commits intodevelop/coyotefrom Jul 3, 2025
Merged
Conversation
Reviewer's GuideThis PR corrects the retrieval and persistence of the display document preference by replacing the hardcoded property name with the UserProperty.DISPLAY_DOCUMENT_AS constant, and restores contentType assignment in the document manager by inferring and setting the MIME type for non-PDF files based on their file extension. Class diagram for UserProperty display document preference fixclassDiagram
class ProviderProperty2Action {
+String viewDisplayDocumentAs()
+String saveDisplayDocumentAs()
}
class UserProperty {
+String DISPLAY_DOCUMENT_AS
+String getName()
+void setName(String)
+String getValue()
+void setValue(String)
}
ProviderProperty2Action --> UserProperty : uses
note for ProviderProperty2Action "Now uses UserProperty.DISPLAY_DOCUMENT_AS instead of hardcoded string for property name"
Class diagram for AddEditDocument2Action contentType assignmentclassDiagram
class AddEditDocument2Action {
-boolean addDocument(HttpServletRequest request)
}
class Document {
+void setContentType(String)
+void setNumberOfPages(int)
}
AddEditDocument2Action --> Document : sets contentType
note for AddEditDocument2Action "Now infers contentType for non-PDF files from file extension"
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
yingbull
approved these changes
Jul 3, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added a fix to ensure that the document property uses the correct field in the database. Fixed issue where image file types were not being set in document manager
Summary by Sourcery
Fix retrieval and storage of display document preferences using the correct property constant and ensure document content types are set correctly based on file extension
Bug Fixes: