Skip to content

[Bugfix:TAGrading] CSV Upload Numeric #12972

Merged
bmcutler merged 17 commits into
mainfrom
csv-upload-numeric-zeros
Jul 7, 2026
Merged

[Bugfix:TAGrading] CSV Upload Numeric #12972
bmcutler merged 17 commits into
mainfrom
csv-upload-numeric-zeros

Conversation

@NicholasCiuica

@NicholasCiuica NicholasCiuica commented Jun 30, 2026

Copy link
Copy Markdown
Member

Why is this Change Important & Necessary?

Closes #12903

What is the New Behavior?

If a CSV is uploaded to a numeric gradeable, any cells with value 0 will not be added as gradeable component data to the database. In the previous behavior, these value-0 cells made deleting "empty" columns after csv upload difficult. This issue may be related to recent issues where adding additional numeric columns after doing a CSV upload could make some columns unalterable.

What steps should a reviewer take to reproduce or test the bug or new feature?

  1. Sign in as instructor on main
  2. Create a new numeric/text gradeable with at least one numeric column
  3. Use CSV upload to import component data, with at least one of the components being a 0
Screenshot 2026-06-30 165425
  1. Go to SQL-Toolbox and use the following db query: select * from gradeable_data join gradeable_component_data on gradeable_data.gd_id=gradeable_component_data.gd_id where g_id='<THE ID OF YOUR GRADEABLE>'
  2. You will see entries with gcd_score = 0 wherever in your gradeable that the CSV uploaded a numeric value of 0.
image
  1. Now checkout this PR's branch and repeat steps 3-4; you should not see any database entries with gcd_score = 0.

EDIT: Also try uploading values above the max score set on a numeric column. On main, a component will be saved to the database with a value of 0 at the location of the high value. On this PR's branch, any invalid score that is uploaded from a CSV should have no effect on the database (no new component data added).

Automated Testing & Documentation

Cypress tests for CSV uploading to numeric gradeables will be updated/introduced in another PR.

Other information

this css class was not used for anything in the code except identification, and the id is better for that since its unique
doesn't work. I don't think I am accessing the component data correctly to check whether the numeric score is 0
@github-project-automation github-project-automation Bot moved this to Seeking Reviewer in Submitty Development Jun 30, 2026
@automateprojectmangement automateprojectmangement Bot moved this from Seeking Reviewer to Work in Progress in Submitty Development Jun 30, 2026
@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 21.29%. Comparing base (412f878) to head (0ab6140).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main   #12972      +/-   ##
============================================
- Coverage     21.30%   21.29%   -0.01%     
  Complexity    10055    10055              
============================================
  Files           277      277              
  Lines         37621    37626       +5     
  Branches        513      513              
============================================
  Hits           8014     8014              
- Misses        29105    29110       +5     
  Partials        502      502              
Flag Coverage Δ
autograder 21.16% <ø> (ø)
js 1.98% <ø> (ø)
migrator 100.00% <ø> (ø)
php 20.24% <0.00%> (-0.01%) ⬇️
python_submitty_utils 79.83% <ø> (ø)
submitty_daemon_jobs 91.13% <ø> (ø)
vue 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@NicholasCiuica NicholasCiuica changed the title [Bugfix :TAGrading] CSV Upload to Numeric with Zeros [Bugfix :TAGrading] CSV Upload Zeros to Numeric Jun 30, 2026
@NicholasCiuica NicholasCiuica changed the title [Bugfix :TAGrading] CSV Upload Zeros to Numeric [Bugfix :TAGrading] CSV Upload Numeric Jun 30, 2026
@NicholasCiuica NicholasCiuica changed the title [Bugfix :TAGrading] CSV Upload Numeric [Bugfix:TAGrading] CSV Upload Numeric Jun 30, 2026
this color change makes uploaded cells of value 0 have a grey text color, which is not needed because we want the user to see clearly that this cell was changed by the upload, and it already has the darker background color just like other altered uploaded cells
Previous behavior: if uploaded cell value was above clamp, that cell would still be saved to the db as a component of value 0, which should not be happening
@NicholasCiuica
NicholasCiuica marked this pull request as ready for review July 1, 2026 16:02
@automateprojectmangement automateprojectmangement Bot moved this from Work in Progress to Seeking Reviewer in Submitty Development Jul 1, 2026

@dandrecollins07-ctrl dandrecollins07-ctrl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code looks good, and functionality works properly. Approving.

@github-project-automation github-project-automation Bot moved this from Seeking Reviewer to Awaiting Maintainer Review in Submitty Development Jul 3, 2026
@bmcutler

bmcutler commented Jul 5, 2026

Copy link
Copy Markdown
Member

@NicholasCiuica
Please resolve the merge conflict and verify PR is still working as expected. Thx!

...so I don't wanna accidentally add it back when this PR gets merged? Not sure if it would work out like that but I wanna be safe

@dandrecollins07-ctrl dandrecollins07-ctrl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Re-tested after the merge conflict resolution. Verified that uploading a CSV with valid numeric values still works as expected. Also confirmed that uploading a value of 0 does not create a gcd_score = 0 entry in the database, and uploading a value above the component max no longer inserts a 0 into the database either. The functionality described in the PR is working correctly.

@bmcutler
bmcutler merged commit 5d3fbd0 into main Jul 7, 2026
26 of 28 checks passed
@bmcutler
bmcutler deleted the csv-upload-numeric-zeros branch July 7, 2026 00:03
@github-project-automation github-project-automation Bot moved this from Awaiting Maintainer Review to Done in Submitty Development Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

[Bug:TAGrading] CSV Upload to Numerics with Zeros

3 participants