| Summary: | Default budget is not selected in addorderiso2709.pl | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Matt Blenkinsop <matt.blenkinsop> |
| Component: | Acquisitions | Assignee: | Matt Blenkinsop <matt.blenkinsop> |
| Status: | CLOSED FIXED | QA Contact: | Marcel de Rooy <m.de.rooy> |
| Severity: | trivial | ||
| Priority: | P5 - low | CC: | fridolin.somers, m.de.rooy |
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | Trivial patch |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: |
23.11.00,23.05.04,22.11.10
|
|
| Circulation function: | |||
| Attachments: |
Test file with mapped fields
Bug 34445: Set default budget in addorderiso2709.pl Bug 34445: Set default budget in addorderiso2709.pl Bug 34445: (QA follow-up) Tidy file Bug 34445: Set default budget in addorderiso2709.pl Bug 34445: Set default budget in addorderiso2709.pl |
||
|
Description
Matt Blenkinsop
2023-07-31 09:47:15 UTC
Created attachment 154084 [details]
Test file with mapped fields
Created attachment 154085 [details] [review] Bug 34445: Set default budget in addorderiso2709.pl This patch allows the default budget to be used as a fallback if no budget is selected. Currently the default budget is set using lines 129-133 but then is never used. Test plan: 1) Apply patch 2) restart_all 3) Follow the steps from the bug description 4) Order lines should be added properly Created attachment 154413 [details] [review] Bug 34445: Set default budget in addorderiso2709.pl This patch allows the default budget to be used as a fallback if no budget is selected. Currently the default budget is set using lines 129-133 but then is never used. Test plan: 1) Apply patch 2) restart_all 3) Follow the steps from the bug description 4) Order lines should be added properly Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> WARN tidiness
The file is less tidy than before (bad/messy lines before: 307, now: 308)
Please correct. This is a oneliner patch. Should be possible to tidy :)
Created attachment 154791 [details] [review] Bug 34445: (QA follow-up) Tidy file perl tidy for patch Please squash. Note that perltidy does not like
for (my $i = 0; $i < $count; $i++) {
+ # Use default budget if no budget selected in the UI
+ $budget_codes[$i] = $budget_id
+ if !$budget_codes[$i];
It seems to insert an empty line before the new comment line..
Sorry about that, i think it is nonsense..
Another question:
You are putting an id in a field called budget_code.
Are you really sure that this is correct?? It does not look good.
The terminology is confusing, I think budget_codes needs changing to budget_ids because the values in the array are the integer values from the budget_id fields in aqbudgets. I'll change it and re-upload Created attachment 154795 [details] [review] Bug 34445: Set default budget in addorderiso2709.pl This patch allows the default budget to be used as a fallback if no budget is selected. Currently the default budget is set using lines 129-133 but then is never used. QA follow-up: - perl tidied - budget_codes changed to budget_ids for consistency Test plan: 1) Apply patch 2) restart_all 3) Follow the steps from the bug description 4) Order lines should be added properly Created attachment 154874 [details] [review] Bug 34445: Set default budget in addorderiso2709.pl This patch allows the default budget to be used as a fallback if no budget is selected. Currently the default budget is set using lines 129-133 but then is never used. QA follow-up: - perl tidied - budget_codes changed to budget_ids for consistency Test plan: 1) Apply patch 2) restart_all 3) Follow the steps from the bug description 4) Order lines should be added properly Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> [EDIT] Rearranged comments Pushed to master for 23.11. Nice work everyone, thanks! Pushed to 23.05.x for 23.05.04 Nice work everyone! Pushed to oldstable for 22.11.x |