Skip to content

Fixed age field in Demographic Report Tool#369

Merged
yingbull merged 2 commits intodevelop/coyotefrom
issue-366
Jul 21, 2025
Merged

Fixed age field in Demographic Report Tool#369
yingbull merged 2 commits intodevelop/coyotefrom
issue-366

Conversation

@kateyang1998
Copy link
Copy Markdown

@kateyang1998 kateyang1998 commented Jul 16, 2025

Issue described in #366

Summary by Sourcery

Bug Fixes:

  • Change startYear and endYear input fields from checkbox to text inputs in the Demographic Report JSP

@kateyang1998 kateyang1998 requested a review from yingbull July 16, 2025 14:06
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai bot commented Jul 16, 2025

Reviewer's Guide

In 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

Change Details Files
Replaced year-selection checkboxes with text fields
  • Changed startYear input type from checkbox to text
  • Changed endYear input type from checkbox to text
src/main/webapp/oscarReport/ReportDemographicReport.jsp

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@yingbull yingbull self-requested a review July 21, 2025 15:31
@yingbull yingbull merged commit 08a5e1f into develop/coyote Jul 21, 2025
11 checks passed
@yingbull yingbull deleted the issue-366 branch July 21, 2025 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants