Skip to content
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

Row numbers in Returned Letters Report to match user upload #4332

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

CrystalPea
Copy link
Contributor

@CrystalPea CrystalPea commented Jan 9, 2025

Row numbers in Returned Letters Report to match row numbers in the spreadsheet with recipient data uploaded by service users when they sent the letters.

This far, there has been a mismatch:

When our service users send letters in bulk ia Notify page, they do so by uploading a spreadsheet with recipient data and persinalisation. Each row in the spreadsheet becomes a letter.

In such a spreadsheet, first row is for column headers - for example address_line_1, address_line_2, address_line_3, reference. Then recipient rows start from row 2.

When we save the rows in notifications table in our db, we start from index 0 for first recipient. That means that there is a mismatch of 2 rows between our db and the spreadsheet that has been uploaded.

When collating data for Returned Letters Report, for some reason we have been adding 1 to the db row number - which meant there was still a mismatch - this time by one row.

This commit fixes the mismatch - from now on, the row number we present in returned letters report will match the row number in the uploaded spreadsheet.

We will first send comms to our users telling them about this, and only them merge this PR.

in the spreadsheet with recipient data uploaded by service users
when they sent the letters.

This far, there has been a mismatch:

When our service users send letters in bulk ia Notify page, they
do so by uploading a spreadsheet with recipient data and persinalisation.
Each row in the spreadsheet becomes a letter.

In such a spreadsheet, first row is for column headers - for example
address_line_1, address_line_2, address_line_3, reference.
Then recipient rows start from row 2.

When we save the rows in notifications table in our db, we start
from index 0 for first recipient. That means that there is a
mismatch of 2 rows between our db and the spreadsheet that has been uploaded.

When collating data for Returned Letters Report, for some reason
we have been adding 1 to the db row number - which meant there was
still a mismatch - this time by one row.

This commit fixes the mismatch - from now on, the row number
we present in returned letters report will match the row number
in the uploaded spreadsheet.
@CrystalPea CrystalPea changed the title Row numbers in Returned Letters Report to match row numbers Row numbers in Returned Letters Report to match user upload Jan 9, 2025
Copy link
Member

@quis quis left a comment

Choose a reason for hiding this comment

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

Fine to merge once comms are out

@quis
Copy link
Member

quis commented Jan 27, 2025

Needs to be merged for Wednesday 29 January (what time?)

@CrystalPea CrystalPea merged commit 7dcda7f into main Jan 28, 2025
4 checks passed
@CrystalPea CrystalPea deleted the returned_letters_report_row_number_fix branch January 28, 2025 16:42
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.

3 participants