Fixed age field in Demographic Report Tool#369
Merged
yingbull merged 2 commits intodevelop/coyotefrom Jul 21, 2025
Merged
Conversation
Reviewer's GuideIn the demographic report JSP, the startYear and endYear form fields have been converted from checkbox inputs to text inputs, allowing users to enter specific year values instead of toggling options. File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey @kateyang1998 - I've reviewed your changes and they look great!
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `src/main/webapp/oscarReport/ReportDemographicReport.jsp:518` </location>
<code_context>
</select>
</td>
<td>
- <input type="checkbox" name="startYear" size="4" />
- <input type="checkbox" name="endYear" size="4" />
+ <input type="text" name="startYear" size="4" />
+ <input type="text" name="endYear" size="4" />
</code_context>
<issue_to_address>
Changing from checkboxes to text inputs may affect user input validation.
Text fields for 'startYear' and 'endYear' allow invalid input, such as non-numeric values. Please add validation to restrict input to valid years.
Suggested implementation:
```
<input type="text" name="startYear" size="4" pattern="^(19|20)\d{2}$" title="Enter a valid year (e.g., 1999)" maxlength="4" required />
<input type="text" name="endYear" size="4" pattern="^(19|20)\d{2}$" title="Enter a valid year (e.g., 2023)" maxlength="4" required />
```
If you want to provide even more robust validation and user feedback, consider adding a small JavaScript snippet to check the values on form submission and display an error message if the input is invalid. This is optional, as the HTML5 `pattern` attribute already provides basic validation in modern browsers.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
yingbull
suggested changes
Jul 16, 2025
yingbull
approved these changes
Jul 21, 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.
Issue described in #366
Summary by Sourcery
Bug Fixes: