8000 Fix #5441: Added Student Counts to Personnel Report by IllianiBird · Pull Request #6751 · MegaMek/mekhq · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix #5441: Added Student Counts to Personnel Report #6751

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 24, 2025

Conversation

IllianiBird
Copy link
Collaborator
  • Added logic to track and count students in PersonnelReport.
  • Updated both combat and support personnel reporting to include the number of student personnel.

Fix #5441

Dev Notes

I didn't add children as the personnel report isn't meant for dependents and other 'hangers on'. It's specifically set up for combat and support personnel.

- Added logic to track and count students in `PersonnelReport`.
- Updated both combat and support personnel reporting to include the number of student personnel.
@IllianiBird IllianiBird added Personnel Personnel-related Issues UX User experience labels Apr 23, 2025
@IllianiBird IllianiBird self-assigned this Apr 23, 2025
Copy link
codecov bot commented Apr 23, 2025

Codecov Report

Attention: Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.

Project coverage is 11.40%. Comparing base (1702c4a) to head (4228cf8).
Report is 26 commits behind head on master.

Files with missing lines Patch % Lines
...kHQ/src/mekhq/campaign/report/PersonnelReport.java 0.00% 8 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6751      +/-   ##
============================================
- Coverage     11.40%   11.40%   -0.01%     
+ Complexity     6477     6475       -2     
============================================
  Files          1095     1095              
  Lines        140888   140896       +8     
  Branches      21841    21843       +2     
============================================
- Hits          16069    16065       -4     
- Misses       123160   123171      +11     
- Partials       1659     1660       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@HammerGS HammerGS requested a review from Copilot April 24, 2025 01:15
Copy link
Contributor
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses Fix #5441 by adding logic to count student personnel in both combat and support personnel reports.

  • Added a new counter and condition 8000 al for student personnel in the combat report.
  • Added a new counter and conditional for student personnel in the support report.
Comments suppressed due to low confidence (1)

MekHQ/src/mekhq/campaign/report/PersonnelReport.java:110

  • Consider adding unit tests to verify that the new student counting logic works correctly for both combat and support personnel scenarios.
.append(String.format("%-30s        %4s\n", "Student Combat Personnel", countStudents))

Comment on lines +159 to +160
} else if (primarySupport && p.getStatus().isStudent()) {
countStudents++;
Copy link
Preview
Copilot AI Apr 24, 2025

Choose a reason for hiding this comment

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

Review whether counting student support personnel should depend on the 'primarySupport' flag. If all student support personnel are intended to be counted regardless of primary support status, consider removing the primarySupport condition.

Suggested change
} else if (primarySupport && p.getStatus().isStudent()) {
countStudents++;
} else if (p.getStatus().isStudent()) {

Copilot uses AI. Check for mistakes.

@HammerGS HammerGS merged commit acaee1b into MegaMek:master Apr 24, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Personnel Personnel-related Issues UX User experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RFE] Add student and child counts to personnel breakdown report
2 participants
0