Bug 22630 - Add ability to change the homebranch in course reserves
Summary: Add ability to change the homebranch in course reserves
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Course reserves (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Julian Maurice
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on: 22652 23727
Blocks: 22970 30585
  Show dependency treegraph
 
Reported: 2019-04-03 14:08 UTC by Julian Maurice
Modified: 2022-06-09 12:09 UTC (History)
9 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Medium patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.05.00


Attachments
Bug 22630: Allow to change homebranch in course reserves (12.02 KB, patch)
2019-04-03 14:10 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 22630: Allow to change homebranch in course reserves (12.20 KB, patch)
2019-04-03 17:30 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 22630: Allow to change homebranch in course reserves (12.25 KB, patch)
2019-04-29 16:27 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 22630: Allow to change homebranch in course reserves (12.06 KB, patch)
2019-05-14 13:03 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 22630: Do not modify item fields if course reserve item says LEAVE UNCHANGED (1.24 KB, patch)
2019-05-14 13:03 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 22630: Fix homebranch select's value in course item edit page (1.63 KB, patch)
2019-05-14 13:03 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 22630: Allow to change homebranch in course reserves (12.22 KB, patch)
2019-05-23 11:13 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 22630: Do not modify item fields if course reserve item says LEAVE UNCHANGED (1.29 KB, patch)
2019-05-23 11:13 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 22630: Fix homebranch select's value in course item edit page (1.69 KB, patch)
2019-05-23 11:13 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 22630: Allow to change homebranch in course reserves (12.27 KB, patch)
2019-05-23 11:14 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 22630: Do not modify item fields if course reserve item says LEAVE UNCHANGED (1.34 KB, patch)
2019-05-23 11:14 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 22630: Fix homebranch select's value in course item edit page (1.74 KB, patch)
2019-05-23 11:14 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 22630: Allow to change homebranch in course reserves (12.24 KB, patch)
2019-07-02 08:51 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 22630: Do not modify item fields if course reserve item says LEAVE UNCHANGED (1.42 KB, patch)
2019-07-02 08:51 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 22630: Fix homebranch select's value in course item edit page (1.81 KB, patch)
2019-07-02 08:51 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 22630: Allow _RevertFields to set an empty value to item field (925 bytes, patch)
2019-07-02 08:51 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 22630: Allow to change homebranch in course reserves (12.24 KB, patch)
2019-07-18 13:02 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 22630: Do not modify item fields if course reserve item says LEAVE UNCHANGED (1.10 KB, patch)
2019-07-18 13:02 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 22630: Fix homebranch select's value in course item edit page (1.81 KB, patch)
2019-07-18 13:02 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 22630: Allow _RevertFields to set an empty value to item field (925 bytes, patch)
2019-07-18 13:02 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 22630: Allow to change homebranch in course reserves (12.24 KB, patch)
2019-09-04 12:22 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 22630: Fix homebranch select's value in course item edit page (1.81 KB, patch)
2019-09-04 12:22 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 22630: Allow to change homebranch in course reserves (12.39 KB, patch)
2019-09-05 09:48 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 22630: Fix homebranch select's value in course item edit page (1.87 KB, patch)
2019-09-05 09:48 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 22630: Allow to change homebranch in course reserves (21.02 KB, patch)
2020-04-23 10:09 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 22630: Update Koha::Schema::Result::CourseItem (2.80 KB, patch)
2020-04-24 09:02 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 22630: Set is_boolean flag for course_items.homebranch_enabled (874 bytes, patch)
2020-04-24 09:02 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 22630: Allow to change homebranch in course reserves (21.22 KB, patch)
2020-04-27 06:31 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 22630: Update Koha::Schema::Result::CourseItem (2.86 KB, patch)
2020-04-27 06:31 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 22630: Set is_boolean flag for course_items.homebranch_enabled (931 bytes, patch)
2020-04-27 06:31 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 22630: Fix capitalization (1.31 KB, patch)
2020-04-27 06:32 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 22630: Display correct "in storage" value (1.39 KB, patch)
2020-05-25 08:26 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Maurice 2019-04-03 14:08:41 UTC

    
Comment 1 Julian Maurice 2019-04-03 14:10:47 UTC
Created attachment 87355 [details] [review]
Bug 22630: Allow to change homebranch in course reserves

Test plan:
1. Create a course (disabled)
2. Add a reserve to this course for an item and set a homebranch
different from the item's homebranch
3. Enable the course
4. Verify that the item's homebranch has changed
5. Disable the course
6. Verify that the item's homebranch was reset to its initial value
7. prove t/db_dependent/CourseReserves/CourseItems.t
Comment 2 Liz Rea 2019-04-03 17:30:05 UTC
Created attachment 87369 [details] [review]
Bug 22630: Allow to change homebranch in course reserves

Test plan:
1. Create a course (disabled)
2. Add a reserve to this course for an item and set a homebranch
different from the item's homebranch
3. Enable the course
4. Verify that the item's homebranch has changed
5. Disable the course
6. Verify that the item's homebranch was reset to its initial value
7. prove t/db_dependent/CourseReserves/CourseItems.t

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Comment 3 Katrin Fischer 2019-04-06 18:35:22 UTC
This seems to work well, but something seems not right with course reserves so I couldn't test fully. I have filed bug 22652.
Comment 4 Koha Team University Lyon 3 2019-04-18 12:24:13 UTC
Hello,
I 've seen that the problem mentionned in bug22652 also occured here for Shelving location and Home library.


And we can't retrieve the field "home library" when we use the batch to add reserve course (gi-bin/koha/course_reserves/batch_add_items.pl), which is not consistent. 

Sonia
Comment 5 Liz Rea 2019-04-18 14:09:17 UTC
With 22652 pushed maybe time to retest this?
Comment 6 Koha Team University Lyon 3 2019-04-18 14:14:19 UTC
Hello Liz,
I've just test it few hours ago on a sandbox, so it was apllied on master.
It doesn't work for me... but I'm looking forward to see it signed off!
Comment 7 Liz Rea 2019-04-29 16:27:57 UTC
Created attachment 89037 [details] [review]
Bug 22630: Allow to change homebranch in course reserves

Test plan:
1. Create a course (disabled)
2. Add a reserve to this course for an item and set a homebranch
different from the item's homebranch
3. Enable the course
4. Verify that the item's homebranch has changed
5. Disable the course
6. Verify that the item's homebranch was reset to its initial value
7. prove t/db_dependent/CourseReserves/CourseItems.t

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Comment 8 Liz Rea 2019-04-29 16:30:33 UTC
Have just retested this on a dockerbox, all looks ok by me, item is modified as I expected (on top of 22652)

Cheers,
Liz
Comment 9 Katrin Fischer 2019-04-29 20:22:47 UTC
Ok, I did:

- Apply the patch
- restart_all
- updatedatabase
- dbic
- restart_all


Then I added 2 items to course reserves:

1) Leaving all unchanged
- Everything shows up in the table correctly - OK
- When editing, they all show "Leave unchanged" - OK
- But: change all settings, they are not saved! - BOO!

Logs show:

DBD::mysql::st execute failed: Cannot add or update a child row: a foreign key constraint fails (`koha_kohadev`.`items`, CONSTRAINT `items_ibfk_2` FOREIGN KEY (`homebranch`) REFERENCES `branches` (`branchcode`) ON UPDATE CASCADE) [for Statement "UPDATE items SET itype=?,homebranch=?,holdingbranch=?,ccode=?,permanent_location=?,location=? WHERE itemnumber=?" with ParamValues: 0="", 1="", 2="", 3="", 4="", 5="", 6=14] at /home/vagrant/kohaclone/C4/Items.pm line 1811.
ERROR in _koha_modify_item UPDATE items SET itype=?,homebranch=?,holdingbranch=?,ccode=?,permanent_location=?,location=? WHERE itemnumber=?: Cannot add or update a child row: a foreign key constraint fails (`koha_kohadev`.`items`, CONSTRAINT `items_ibfk_2` FOREIGN KEY (`homebranch`) REFERENCES `branches` (`branchcode`) ON UPDATE CASCADE) at /home/vagrant/kohaclone/C4/Items.pm line 1814.

2) Change all values
- The location is missing from the display summary table (empty) - BOO!
- When editing, the home library shows as 'unchanged' - BOO!

Sorry for the BOOs, but I think this still needs some work.
Comment 10 Liz Rea 2019-04-29 21:30:55 UTC
(In reply to Katrin Fischer from comment #9)
> Ok, I did:
> 
> - Apply the patch
> - restart_all
> - updatedatabase
> - dbic
> - restart_all
> 
> 
> Then I added 2 items to course reserves:
> 
> 1) Leaving all unchanged
> - Everything shows up in the table correctly - OK
> - When editing, they all show "Leave unchanged" - OK
> - But: change all settings, they are not saved! - BOO!

I just tested this again, and they were saved?

> 
> Logs show:
> 
> DBD::mysql::st execute failed: Cannot add or update a child row: a foreign
> key constraint fails (`koha_kohadev`.`items`, CONSTRAINT `items_ibfk_2`
> FOREIGN KEY (`homebranch`) REFERENCES `branches` (`branchcode`) ON UPDATE
> CASCADE) [for Statement "UPDATE items SET
> itype=?,homebranch=?,holdingbranch=?,ccode=?,permanent_location=?,location=?
> WHERE itemnumber=?" with ParamValues: 0="", 1="", 2="", 3="", 4="", 5="",
> 6=14] at /home/vagrant/kohaclone/C4/Items.pm line 1811.
> ERROR in _koha_modify_item UPDATE items SET
> itype=?,homebranch=?,holdingbranch=?,ccode=?,permanent_location=?,location=?
> WHERE itemnumber=?: Cannot add or update a child row: a foreign key
> constraint fails (`koha_kohadev`.`items`, CONSTRAINT `items_ibfk_2` FOREIGN
> KEY (`homebranch`) REFERENCES `branches` (`branchcode`) ON UPDATE CASCADE)
> at /home/vagrant/kohaclone/C4/Items.pm line 1814.

I did not receive this message.

> 
> 2) Change all values
> - The location is missing from the display summary table (empty) - BOO!

This appears on my screen, between collection and home library?

> - When editing, the home library shows as 'unchanged' - BOO!

Legit, I missed this. :(

> 
> Sorry for the BOOs, but I think this still needs some work.

It does, but possibly not as much as all of this.
Comment 11 Julian Maurice 2019-05-14 13:03:42 UTC
Created attachment 89741 [details] [review]
Bug 22630: Allow to change homebranch in course reserves

Test plan:
1. Create a course (disabled)
2. Add a reserve to this course for an item and set a homebranch
different from the item's homebranch
3. Enable the course
4. Verify that the item's homebranch has changed
5. Disable the course
6. Verify that the item's homebranch was reset to its initial value
7. prove t/db_dependent/CourseReserves/CourseItems.t

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Comment 12 Julian Maurice 2019-05-14 13:03:46 UTC
Created attachment 89742 [details] [review]
Bug 22630: Do not modify item fields if course reserve item says LEAVE UNCHANGED
Comment 13 Julian Maurice 2019-05-14 13:03:50 UTC
Created attachment 89743 [details] [review]
Bug 22630: Fix homebranch select's value in course item edit page
Comment 14 Julian Maurice 2019-05-14 13:06:26 UTC
Initial patch rebased on master.
The last two patches should fix mentioned issues
Comment 15 Biblibre Sandboxes 2019-05-23 11:13:10 UTC
Patch tested with a sandbox, by SONIA BOUIS <sonia.bouis@univ-lyon3.fr>
Comment 16 Biblibre Sandboxes 2019-05-23 11:13:47 UTC
Created attachment 90023 [details] [review]
Bug 22630: Allow to change homebranch in course reserves

Test plan:
1. Create a course (disabled)
2. Add a reserve to this course for an item and set a homebranch
different from the item's homebranch
3. Enable the course
4. Verify that the item's homebranch has changed
5. Disable the course
6. Verify that the item's homebranch was reset to its initial value
7. prove t/db_dependent/CourseReserves/CourseItems.t

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: SONIA BOUIS <sonia.bouis@univ-lyon3.fr>
Comment 17 Biblibre Sandboxes 2019-05-23 11:13:50 UTC
Created attachment 90024 [details] [review]
Bug 22630: Do not modify item fields if course reserve item says LEAVE UNCHANGED

Signed-off-by: SONIA BOUIS <sonia.bouis@univ-lyon3.fr>
Comment 18 Biblibre Sandboxes 2019-05-23 11:13:53 UTC
Created attachment 90025 [details] [review]
Bug 22630: Fix homebranch select's value in course item edit page

Signed-off-by: SONIA BOUIS <sonia.bouis@univ-lyon3.fr>
Comment 19 Biblibre Sandboxes 2019-05-23 11:14:11 UTC
Patch tested with a sandbox, by SONIA BOUIS <sonia.bouis@univ-lyon3.fr>
Comment 20 Biblibre Sandboxes 2019-05-23 11:14:48 UTC
Created attachment 90026 [details] [review]
Bug 22630: Allow to change homebranch in course reserves

Test plan:
1. Create a course (disabled)
2. Add a reserve to this course for an item and set a homebranch
different from the item's homebranch
3. Enable the course
4. Verify that the item's homebranch has changed
5. Disable the course
6. Verify that the item's homebranch was reset to its initial value
7. prove t/db_dependent/CourseReserves/CourseItems.t

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: SONIA BOUIS <sonia.bouis@univ-lyon3.fr>

Signed-off-by: SONIA BOUIS <sonia.bouis@univ-lyon3.fr>
Comment 21 Biblibre Sandboxes 2019-05-23 11:14:51 UTC
Created attachment 90027 [details] [review]
Bug 22630: Do not modify item fields if course reserve item says LEAVE UNCHANGED

Signed-off-by: SONIA BOUIS <sonia.bouis@univ-lyon3.fr>

Signed-off-by: SONIA BOUIS <sonia.bouis@univ-lyon3.fr>
Comment 22 Biblibre Sandboxes 2019-05-23 11:14:53 UTC
Created attachment 90028 [details] [review]
Bug 22630: Fix homebranch select's value in course item edit page

Signed-off-by: SONIA BOUIS <sonia.bouis@univ-lyon3.fr>

Signed-off-by: SONIA BOUIS <sonia.bouis@univ-lyon3.fr>
Comment 23 Koha Team University Lyon 3 2019-05-23 11:21:02 UTC
I have followed the test plan and everything was OK.
I have also tested the situation where you remove one item from the course : the item's homebranch is reset to his initial value.

But I haven't done the 7th step : prove t/db_dependent/CourseReserves/CourseItems.t

Don't know how to do that....
Comment 24 Liz Rea 2019-05-24 15:36:29 UTC
Hi, 

I was ready to sign this off but we have a test failure: 

#   Failed test 'Item ccode should be set back to empty'
#   at t/db_dependent/CourseReserves/CourseItems.t line 167.
#          got: 'DVD'
#     expected: ''


Have a look?

Cheers,
Liz
Comment 25 Andrew Fuerste-Henry 2019-06-10 12:23:22 UTC
*** Bug 23083 has been marked as a duplicate of this bug. ***
Comment 26 Katrin Fischer 2019-06-10 12:32:30 UTC
2 problems here, this is failed QA as an enhancement, but also happens to fix a critical bug - bug 23083. Could the bug fix be separated from the bug?
Comment 27 Julian Maurice 2019-07-02 08:51:34 UTC
Created attachment 91177 [details] [review]
Bug 22630: Allow to change homebranch in course reserves

Test plan:
1. Create a course (disabled)
2. Add a reserve to this course for an item and set a homebranch
different from the item's homebranch
3. Enable the course
4. Verify that the item's homebranch has changed
5. Disable the course
6. Verify that the item's homebranch was reset to its initial value
7. prove t/db_dependent/CourseReserves/CourseItems.t

Sponsored-by: Université de Lyon 3
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: SONIA BOUIS <sonia.bouis@univ-lyon3.fr>
Comment 28 Julian Maurice 2019-07-02 08:51:39 UTC
Created attachment 91178 [details] [review]
Bug 22630: Do not modify item fields if course reserve item says LEAVE UNCHANGED

Sponsored-by: Université de Lyon 3
Signed-off-by: SONIA BOUIS <sonia.bouis@univ-lyon3.fr>
Comment 29 Julian Maurice 2019-07-02 08:51:43 UTC
Created attachment 91179 [details] [review]
Bug 22630: Fix homebranch select's value in course item edit page

Sponsored-by: Université de Lyon 3
Signed-off-by: SONIA BOUIS <sonia.bouis@univ-lyon3.fr>
Comment 30 Julian Maurice 2019-07-02 08:51:49 UTC
Created attachment 91180 [details] [review]
Bug 22630: Allow _RevertFields to set an empty value to item field

Sponsored-by: Université de Lyon 3
Comment 31 Maryse Simard 2019-07-05 19:06:33 UTC
Applying: Bug 22630: Allow to change homebranch in course reserves
Using index info to reconstruct a base tree...
M	C4/CourseReserves.pm
M	t/db_dependent/CourseReserves/CourseItems.t
Falling back to patching base and 3-way merge...
Auto-merging t/db_dependent/CourseReserves/CourseItems.t
CONFLICT (content): Merge conflict in t/db_dependent/CourseReserves/CourseItems.t
Auto-merging C4/CourseReserves.pm
error: Failed to merge in the changes.
Patch failed at 0001 Bug 22630: Allow to change homebranch in course reserves
Comment 32 Julian Maurice 2019-07-18 13:02:08 UTC
Created attachment 91575 [details] [review]
Bug 22630: Allow to change homebranch in course reserves

Test plan:
1. Create a course (disabled)
2. Add a reserve to this course for an item and set a homebranch
different from the item's homebranch
3. Enable the course
4. Verify that the item's homebranch has changed
5. Disable the course
6. Verify that the item's homebranch was reset to its initial value
7. prove t/db_dependent/CourseReserves/CourseItems.t

Sponsored-by: Université de Lyon 3
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: SONIA BOUIS <sonia.bouis@univ-lyon3.fr>
Comment 33 Julian Maurice 2019-07-18 13:02:13 UTC
Created attachment 91576 [details] [review]
Bug 22630: Do not modify item fields if course reserve item says LEAVE UNCHANGED

Sponsored-by: Université de Lyon 3
Signed-off-by: SONIA BOUIS <sonia.bouis@univ-lyon3.fr>
Comment 34 Julian Maurice 2019-07-18 13:02:17 UTC
Created attachment 91577 [details] [review]
Bug 22630: Fix homebranch select's value in course item edit page

Sponsored-by: Université de Lyon 3
Signed-off-by: SONIA BOUIS <sonia.bouis@univ-lyon3.fr>
Comment 35 Julian Maurice 2019-07-18 13:02:21 UTC
Created attachment 91578 [details] [review]
Bug 22630: Allow _RevertFields to set an empty value to item field

Sponsored-by: Université de Lyon 3
Comment 36 Koha Team University Lyon 3 2019-08-26 15:22:11 UTC
Hello,
there was a conflict when I tryed to install it on a sandbox :

CONFLICT (content): Merge conflict in t/db_dependent/CourseReserves/CourseItems.t
Comment 37 Julian Maurice 2019-09-04 12:22:30 UTC
Created attachment 92579 [details] [review]
Bug 22630: Allow to change homebranch in course reserves

Test plan:
1. Create a course (disabled)
2. Add a reserve to this course for an item and set a homebranch
different from the item's homebranch
3. Enable the course
4. Verify that the item's homebranch has changed
5. Disable the course
6. Verify that the item's homebranch was reset to its initial value
7. prove t/db_dependent/CourseReserves/CourseItems.t

Sponsored-by: Université de Lyon 3
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: SONIA BOUIS <sonia.bouis@univ-lyon3.fr>
Comment 38 Julian Maurice 2019-09-04 12:22:41 UTC
Created attachment 92580 [details] [review]
Bug 22630: Fix homebranch select's value in course item edit page

Sponsored-by: Université de Lyon 3
Signed-off-by: SONIA BOUIS <sonia.bouis@univ-lyon3.fr>
Comment 39 Julian Maurice 2019-09-04 12:24:10 UTC
Patches rebased on master.

Removed two patches because a similar fix was pushed in bug 22142
Comment 40 Koha Team University Lyon 3 2019-09-05 09:45:44 UTC
I tested it according to the plan test and everything was fine.
I also tried to modify the value changed by the reserve course, to delete one item in the course and to delete a course. Everything works fine, the value of the item return to their original values.
It's OK for me.
Comment 41 Biblibre Sandboxes 2019-09-05 09:47:12 UTC
Patch tested with a sandbox, by sonia bouis <sonia.bouis@univ-lyon3.fr>
Comment 42 Biblibre Sandboxes 2019-09-05 09:48:03 UTC
Created attachment 92603 [details] [review]
Bug 22630: Allow to change homebranch in course reserves

Test plan:
1. Create a course (disabled)
2. Add a reserve to this course for an item and set a homebranch
different from the item's homebranch
3. Enable the course
4. Verify that the item's homebranch has changed
5. Disable the course
6. Verify that the item's homebranch was reset to its initial value
7. prove t/db_dependent/CourseReserves/CourseItems.t

Sponsored-by: Université de Lyon 3
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: SONIA BOUIS <sonia.bouis@univ-lyon3.fr>

Signed-off-by: sonia bouis <sonia.bouis@univ-lyon3.fr>
Comment 43 Biblibre Sandboxes 2019-09-05 09:48:06 UTC
Created attachment 92604 [details] [review]
Bug 22630: Fix homebranch select's value in course item edit page

Sponsored-by: Université de Lyon 3
Signed-off-by: SONIA BOUIS <sonia.bouis@univ-lyon3.fr>

Signed-off-by: sonia bouis <sonia.bouis@univ-lyon3.fr>
Comment 44 Katrin Fischer 2019-10-03 09:35:27 UTC
The behaviour when editing items is really weird atm, I have filed a new bug 23727 - once this if fixed, this should be pretty straight forward.
Comment 45 Katrin Fischer 2019-10-03 09:36:05 UTC
Tiny thing: Capitalization on course summary page needs to be fixed.
Comment 46 Katrin Fischer 2020-04-22 23:10:49 UTC
I'd love for this to move now we got 23727 fixed, but sadly this no longer applies :( Could we get a rebase please?

CONFLICT (content): Merge conflict in t/db_dependent/CourseReserves/CourseItems.t
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step2.tt
Auto-merging installer/data/mysql/kohastructure.sql
CONFLICT (content): Merge conflict in installer/data/mysql/kohastructure.sql
Auto-merging course_reserves/add_items.pl
CONFLICT (content): Merge conflict in course_reserves/add_items.pl
Auto-merging C4/CourseReserves.pm
Comment 47 Julian Maurice 2020-04-23 10:09:19 UTC
Created attachment 103556 [details] [review]
Bug 22630: Allow to change homebranch in course reserves

Test plan:
1. Create a course (disabled)
2. Add a reserve to this course for an item and set a homebranch
   different from the item's homebranch
3. Enable the course
4. Verify that the item's homebranch has changed
5. Disable the course
6. Verify that the item's homebranch was reset to its initial value
7. prove t/db_dependent/CourseReserves/CourseItems.t

Sponsored-by: Université de Lyon 3
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Sonia Bouis <sonia.bouis@univ-lyon3.fr>
Comment 48 Julian Maurice 2020-04-23 10:09:43 UTC
Patch rebased on master
Comment 49 Katrin Fischer 2020-04-24 08:41:03 UTC
Forgot to comment earlier, there is a QA tool fail about the boolean/tinyint. Can you please check/fix?
Comment 50 Julian Maurice 2020-04-24 09:02:46 UTC
Created attachment 103634 [details] [review]
Bug 22630: Update Koha::Schema::Result::CourseItem
Comment 51 Julian Maurice 2020-04-24 09:02:50 UTC
Created attachment 103635 [details] [review]
Bug 22630: Set is_boolean flag for course_items.homebranch_enabled
Comment 52 Katrin Fischer 2020-04-27 06:31:48 UTC
Created attachment 103733 [details] [review]
Bug 22630: Allow to change homebranch in course reserves

Test plan:
1. Create a course (disabled)
2. Add a reserve to this course for an item and set a homebranch
   different from the item's homebranch
3. Enable the course
4. Verify that the item's homebranch has changed
5. Disable the course
6. Verify that the item's homebranch was reset to its initial value
7. prove t/db_dependent/CourseReserves/CourseItems.t

Sponsored-by: Université de Lyon 3
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Sonia Bouis <sonia.bouis@univ-lyon3.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 53 Katrin Fischer 2020-04-27 06:31:52 UTC
Created attachment 103734 [details] [review]
Bug 22630: Update Koha::Schema::Result::CourseItem

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 54 Katrin Fischer 2020-04-27 06:31:57 UTC
Created attachment 103735 [details] [review]
Bug 22630: Set is_boolean flag for course_items.homebranch_enabled

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 55 Katrin Fischer 2020-04-27 06:32:01 UTC
Created attachment 103736 [details] [review]
Bug 22630: Fix capitalization

Home Library -> Home library
Holding Library -> Holding library

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 56 Katrin Fischer 2020-04-27 06:34:58 UTC
This is not a big change actually as it follows what is done for homebranch already. I'd be happy to see this in 20.05 as for the issues with the item editing in course reserves it already missed a few releases.
Comment 57 Martin Renvoize 2020-04-29 16:35:45 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 58 Joy Nelson 2020-05-08 22:30:57 UTC
not backported to 19.11
Comment 59 Jonathan Druart 2020-05-25 08:26:39 UTC
Created attachment 105324 [details] [review]
Bug 22630: Display correct "in storage" value
Comment 60 Jonathan Druart 2020-05-25 14:00:57 UTC
(In reply to Jonathan Druart from comment #59)
> Created attachment 105324 [details] [review] [review]
> Bug 22630: Display correct "in storage" value

Last patch pushed to master for 20.05.