Bug 20426 - Can't import all titles from a stage file with default values
Summary: Can't import all titles from a stage file with default values
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: master
Hardware: All All
: P5 - low critical (vote)
Assignee: Jonathan Druart
QA Contact: Katrin Fischer
URL:
Whiteboard:
Keywords:
Depends on: 19453
Blocks:
  Show dependency treegraph
 
Reported: 2018-03-15 14:51 UTC by Koha Team Lyon 3
Modified: 2018-06-07 08:12 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 20426: Fix default fund value when adding orders from iso2709 file (2.62 KB, patch)
2018-04-02 16:04 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 20426: Fix default fund value when adding orders from iso2709 file (2.67 KB, patch)
2018-04-10 15:43 UTC, sandboxes@biblibre.com
Details | Diff | Splinter Review
Bug 20426: Fix default fund value when adding orders from iso2709 file (2.72 KB, patch)
2018-04-12 09:56 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Koha Team Lyon 3 2018-03-15 14:51:48 UTC
When you import staged file for an order, you could have a lot of title in a file and you need to use default "item information" and default "Default accounting details" to choose budget and item informations.
I try to import with this default information and I have an error message : 'Some budgets are not defined in item records'
We use this every day in my university and we really need this.

Sonia
Comment 1 Jonathan Druart 2018-03-26 15:14:05 UTC
Hi Sonia, you need to select a fund in the "Default accounting details" tab or "Select to import" (one for each record to import).
Comment 2 Katrin Fischer 2018-03-31 23:24:32 UTC
We tested this at the hackfest and selecting the fund on the default accounting details should work - otherwise it would have no function. Sonia also said that they used the feature a lot and it used to work like that.
Comment 3 Jonathan Druart 2018-04-02 15:57:23 UTC
Ha, I think I found the problem.

It has been caused by
  commit b830349f45007629f141a9835e05b95f90ee4b92
  Bug 19453: Incorrect jQuery selector for fund drop down validation
Comment 4 Jonathan Druart 2018-04-02 16:04:13 UTC
Created attachment 73530 [details] [review]
Bug 20426: Fix default fund value when adding orders from iso2709 file

A new bug has been highlighted since:
  commit b830349f45007629f141a9835e05b95f90ee4b92
  Bug 19453: Incorrect jQuery selector for fund drop down validation

Prior to bug 19453 the check on the existence of the fund did not work
as expected, no select with name='budget_code' existed and the error was
never raised.
Now it works but expect a fund to be selected for every record to
import.
This check must only be done if there is no default value selected.

Test plan:
- Create an order from a staged file
- Do not select any funds
=> You must get a warning
- Select a specific fund for some of the records
=> You must get a warning
- Select a default fund in the last tab
=> You must not get a warning and the records must be imported and
inserted with the correct fund
Comment 5 sandboxes@biblibre.com 2018-04-10 15:43:11 UTC
Patch tested with a sandbox, by Sonia Bouis <sonia.bouis@univ-lyon3.fr>
Comment 6 sandboxes@biblibre.com 2018-04-10 15:43:32 UTC
Created attachment 73956 [details] [review]
Bug 20426: Fix default fund value when adding orders from iso2709 file

A new bug has been highlighted since:
  commit b830349f45007629f141a9835e05b95f90ee4b92
  Bug 19453: Incorrect jQuery selector for fund drop down validation

Prior to bug 19453 the check on the existence of the fund did not work
as expected, no select with name='budget_code' existed and the error was
never raised.
Now it works but expect a fund to be selected for every record to
import.
This check must only be done if there is no default value selected.

Test plan:
- Create an order from a staged file
- Do not select any funds
=> You must get a warning
- Select a specific fund for some of the records
=> You must get a warning
- Select a default fund in the last tab
=> You must not get a warning and the records must be imported and
inserted with the correct fund

Signed-off-by: Sonia Bouis <sonia.bouis@univ-lyon3.fr>
Comment 7 Koha Team Lyon 3 2018-04-10 15:57:35 UTC
I've followed the test plan and every was as expected :

- I didn't define any fund on the first tab and on the third tab : I had a warning : "Some budgets are not defined in item records"
- I defined only some funds in the first tab : I had a warning : "Some budgets are not defined in item records"
- I defined a fund in the third tab : all my orders are imported in the right fund
Comment 8 Katrin Fischer 2018-04-12 09:55:15 UTC
Thx Sonia!
Comment 9 Katrin Fischer 2018-04-12 09:56:23 UTC
Created attachment 74064 [details] [review]
Bug 20426: Fix default fund value when adding orders from iso2709 file

A new bug has been highlighted since:
  commit b830349f45007629f141a9835e05b95f90ee4b92
  Bug 19453: Incorrect jQuery selector for fund drop down validation

Prior to bug 19453 the check on the existence of the fund did not work
as expected, no select with name='budget_code' existed and the error was
never raised.
Now it works but expect a fund to be selected for every record to
import.
This check must only be done if there is no default value selected.

Test plan:
- Create an order from a staged file
- Do not select any funds
=> You must get a warning
- Select a specific fund for some of the records
=> You must get a warning
- Select a default fund in the last tab
=> You must not get a warning and the records must be imported and
inserted with the correct fund

Signed-off-by: Sonia Bouis <sonia.bouis@univ-lyon3.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 10 Jonathan Druart 2018-04-12 15:06:10 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 11 Nick Clemens 2018-05-14 21:02:17 UTC
Pushed to stbale for 17.11.06

Awesome work all!
Comment 12 Fridolin SOMERS 2018-05-22 11:07:12 UTC
Depends on Bug 19453 not in 17.05.x