Merge the latest coyote into the latest dogfish#493
Merged
yingbull merged 4 commits intodevelop/dogfishfrom Sep 6, 2025
Merged
Merge the latest coyote into the latest dogfish#493yingbull merged 4 commits intodevelop/dogfishfrom
yingbull merged 4 commits intodevelop/dogfishfrom
Conversation
…functionality in EChart -> encounter note
Reviewer's GuideThis PR integrates the latest ‘coyote’ branch into ‘develop/dogfish’ by resolving merge conflicts in CaseManagementEntry2Action.java, removing obsolete commented code, standardizing session parameter handling, and cleaning up logging and formatting. Class diagram for updated session parameter handling in CaseManagementEntry2ActionclassDiagram
class CaseManagementEntry2Action {
+edit()
+issueNoteSaveJson()
+issueNoteSave()
+save()
...
}
CaseManagementEntry2Action : -session.setAttribute("note_sort", request.getParameter("note_sort"))
CaseManagementEntry2Action : -session.setAttribute("filter_roles", request.getParameterValues("filter_roles"))
CaseManagementEntry2Action : -session.setAttribute("filter_provider", request.getParameterValues("filter_providers"))
CaseManagementEntry2Action : -session.setAttribute("issues", request.getParameterValues("issues"))
CaseManagementEntry2Action : +if (noteSort != null) session.setAttribute("note_sort", noteSort)
CaseManagementEntry2Action : +if (filterRoles != null) { if (filterRoles.length > 0) session.setAttribute("filter_roles", filterRoles) else session.removeAttribute("filter_roles") }
CaseManagementEntry2Action : +if (filterProviders != null) { if (filterProviders.length > 0) session.setAttribute("filter_provider", filterProviders) else session.removeAttribute("filter_provider") }
CaseManagementEntry2Action : +if (issues != null) { if (issues.length > 0) session.setAttribute("issues", issues) else session.removeAttribute("issues") }
Class diagram for removed attributes and methods in CaseManagementEntry2ActionclassDiagram
class CaseManagementEntry2Action {
-OscarMsgType : Integer
-OscarMsgTypeLink : Integer
-getOscarMsgType() : Integer
-setOscarMsgType(Integer)
-getOscarMsgTypeLink() : Integer
-setOscarMsgTypeLink(Integer)
}
%% These attributes and methods were removed in the merge cleanup.
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey there - I've reviewed your changes - here's some feedback:
- CaseManagementEntry2Action is extremely large with many long methods—consider refactoring common logic (especially session‐param handling and issue management) into smaller helper classes or methods to improve readability and maintainability.
- The new request‐to‐session parameter blocks for note_sort, filter_roles, filter_providers, and issues are repetitive—extract a reusable helper to reduce duplication and enforce consistent behavior.
- Verify that the session attribute keys (e.g. "filter_provider" vs. "filter_providers") exactly match your request parameter names to prevent subtle inconsistencies.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- CaseManagementEntry2Action is extremely large with many long methods—consider refactoring common logic (especially session‐param handling and issue management) into smaller helper classes or methods to improve readability and maintainability.
- The new request‐to‐session parameter blocks for note_sort, filter_roles, filter_providers, and issues are repetitive—extract a reusable helper to reduce duplication and enforce consistent behavior.
- Verify that the session attribute keys (e.g. "filter_provider" vs. "filter_providers") exactly match your request parameter names to prevent subtle inconsistencies.
## Individual Comments
### Comment 1
<location> `src/main/java/ca/openosp/openo/casemgmt/web/CaseManagementEntry2Action.java:490` </location>
<code_context>
- session.setAttribute("filter_roles", request.getParameterValues("filter_roles"));
- session.setAttribute("filter_provider", request.getParameterValues("filter_providers"));
- session.setAttribute("issues", request.getParameterValues("issues"));
+ String noteSort = request.getParameter("note_sort");
+ if (noteSort != null) {
+ session.setAttribute("note_sort", noteSort);
</code_context>
<issue_to_address>
Consider refactoring the repeated parameter synchronization logic into helper methods to reduce code duplication and improve clarity.
Consider extracting the repeated if/else into one or two small helpers. For example, add to your action class:
```java
private void syncParamSingle(HttpSession session,
HttpServletRequest request,
String paramName,
String sessionKey) {
String val = request.getParameter(paramName);
if (val != null) {
session.setAttribute(sessionKey, val);
}
}
private void syncParamArray(HttpSession session,
HttpServletRequest request,
String paramName,
String sessionKey) {
String[] vals = request.getParameterValues(paramName);
if (vals != null && vals.length > 0) {
session.setAttribute(sessionKey, vals);
} else {
session.removeAttribute(sessionKey);
}
}
```
Then replace your four blocks with just:
```java
syncParamSingle(session, request, "note_sort", "note_sort");
syncParamArray( session, request, "filter_roles", "filter_roles");
syncParamArray( session, request, "filter_providers","filter_provider");
syncParamArray( session, request, "issues", "issues");
```
This preserves all current behavior (including removal on empty) while collapsing the nested if/elses into a concise loop-like pattern.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
src/main/java/ca/openosp/openo/casemgmt/web/CaseManagementEntry2Action.java
Outdated
Show resolved
Hide resolved
|
Liam, could you test/audit this? I believe this brings something forward from coyote Kate fixed that is not in dogfish. @LiamStanziani |
Collaborator
|
Sounds good I will look into this and fix up the merge conflict as well |
Collaborator
Collaborator
|
Re-running build because of a dependency fail |
yingbull
approved these changes
Sep 6, 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.
develop/coyote, namedcoyote-backupdevelop/dogfish, namedcoyote-dogfish-mergecoyote-backupintocoyote-dogfish-merge, and resolved the conflictscoyote-dogfish-mergeinto the latestdevelop/dogfish.Summary by Sourcery
Merge the latest coyote develop branch into dogfish and clean up the CaseManagementEntry2Action class by streamlining request-to-session parameter handling and removing dead/commented-out code
Enhancements: