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

Fix incoming redelivery to multiple #7898

Merged
merged 2 commits into from
Sep 29, 2023
Merged

Conversation

garethrees
Copy link
Member

Fix minor bug redelivering to multiple & some minor code cleanup

When passing multiple destinations as a CSV [1], we're expecting to
strip these values down to an Array of two stripped ID numbers [2].

This wasn't happening as the each call wasn't returning the stripped
values. As such, we're left with some invalid ID numbers [3] that don't
get found later on.

This fixes this issue by using map, which returns the stripped values.

I've also added some specs. They're not the totally complete, but they
do fail prior to using map and pass afterwards, so good enough for
this specific issue.

[1] e.g. "105, 106"
[2] i.e. ["105", "106"]
[3] i.e. ["105", " 106"] – note the preceding space

Minor style fixes:

* Line spacing
* Line length
* Quote style
* Interpolation
* Variable assignment
When passing multiple destinations as a CSV [1], we're expecting to
strip these values down to an Array of two stripped ID numbers [2].

This wasn't happening as the `each` call wasn't returning the stripped
values. As such, we're left with some invalid ID numbers [3] that don't
get found later on.

This fixes this issue by using `map`, which returns the stripped values.

I've also added some specs. They're not the totally complete, but they
do fail prior to using `map` and pass afterwards, so good enough for
this specific issue.

[1] e.g. `"105, 106"`
[2] i.e. `["105", "106"]`
[3] i.e. `["105", " 106"]` – note the preceding space
@garethrees garethrees force-pushed the fix-incoming-redelivery-to-multiple branch from 6a6f364 to f23d051 Compare September 29, 2023 08:44
@gbp gbp merged commit 2d94cf7 into develop Sep 29, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants