Bug 36618 - Make creation of bibliographic records optional for ERM local titles
Summary: Make creation of bibliographic records optional for ERM local titles
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: ERM (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Matt Blenkinsop
QA Contact:
URL:
Keywords: additional_work_needed
Depends on:
Blocks: 34788
  Show dependency treegraph
 
Reported: 2024-04-17 09:33 UTC by Matt Blenkinsop
Modified: 2024-05-08 18:07 UTC (History)
8 users (show)

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


Attachments
Bug 36618: Make biblio creation optional for ERM local titles (7.00 KB, patch)
2024-04-17 10:38 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 36618: Add unit tests (2.15 KB, patch)
2024-04-17 10:38 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 36618: Make biblio creation optional for ERM local titles (7.04 KB, patch)
2024-05-03 15:18 UTC, Clemens Tubach
Details | Diff | Splinter Review
Bug 36618: Add unit tests (2.18 KB, patch)
2024-05-03 15:18 UTC, Clemens Tubach
Details | Diff | Splinter Review
Bug 36618: Make biblio creation optional for ERM local titles (7.12 KB, patch)
2024-05-08 10:45 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 36618: Add unit tests (2.30 KB, patch)
2024-05-08 10:45 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 36618: (QA follow-up) Hide option for titles with no linked record (1.37 KB, patch)
2024-05-08 10:45 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 36618: Make biblio creation optional for ERM local titles (7.17 KB, patch)
2024-05-08 11:12 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 36618: Add unit tests (2.34 KB, patch)
2024-05-08 11:12 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 36618: (QA follow-up) Hide option for titles with no linked record (1.41 KB, patch)
2024-05-08 11:12 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Blenkinsop 2024-04-17 09:33:13 UTC
Biblio creation for local titles should be optional at the point of creation. This will then be used for the KBART import feature as well
Comment 1 Matt Blenkinsop 2024-04-17 10:38:34 UTC
Created attachment 164992 [details] [review]
Bug 36618: Make biblio creation optional for ERM local titles

This patch makes biblio creation on local title creation optional.

Test plan:
1) Navigate to the local title creation form
2) Create a title and leave the "Create record" box unchecked
3) Submit the form
4) Search the catalogue for the title you have just created - no biblio result will be available
5) Repeat steps 2 - 3 but this time check the box to create a record
6) You should now be able to find a record in the catalogue for the title you just imported
Comment 2 Matt Blenkinsop 2024-04-17 10:38:37 UTC
Created attachment 164993 [details] [review]
Bug 36618: Add unit tests

prove t/db_dependent/api/v1/erm_eholdings_titles.t
Comment 3 Katrin Fischer 2024-05-03 13:48:23 UTC
Hi Clemens and Michaela,
as you have tested bug 34788, would you mind giving this a sign-off as well? You basically already tested it as it has been part of your testing of bug 34788.
Comment 4 Clemens Tubach 2024-05-03 14:38:30 UTC
(In reply to Katrin Fischer from comment #3)
> Hi Clemens and Michaela,
> as you have tested bug 34788, would you mind giving this a sign-off as well?
> You basically already tested it as it has been part of your testing of bug
> 34788.

Hi Katrin,
I have tried to give the sign-off, but the unit test fails:

Test Summary Report
-------------------
t/db_dependent/api/v1/erm_eholdings_titles.t (Wstat: 512 (exited 2) Tests: 5 Failed: 2)
  Failed tests:  3-4
  Non-zero exit status: 2
Files=1, Tests=5, 15 wallclock secs ( 0.03 usr  0.02 sys + 11.53 cusr  1.81 csys = 13.39 CPU)
Result: FAIL
Comment 5 Clemens Tubach 2024-05-03 15:13:44 UTC
The test works, sorry ...
Comment 6 Clemens Tubach 2024-05-03 15:18:34 UTC
Created attachment 166149 [details] [review]
Bug 36618: Make biblio creation optional for ERM local titles

This patch makes biblio creation on local title creation optional.

Test plan:
1) Navigate to the local title creation form
2) Create a title and leave the "Create record" box unchecked
3) Submit the form
4) Search the catalogue for the title you have just created - no biblio result will be available
5) Repeat steps 2 - 3 but this time check the box to create a record
6) You should now be able to find a record in the catalogue for the title you just imported

Signed-off-by: Clemens Tubach <clemens.tubach@kit.edu>
Comment 7 Clemens Tubach 2024-05-03 15:18:36 UTC
Created attachment 166150 [details] [review]
Bug 36618: Add unit tests

prove t/db_dependent/api/v1/erm_eholdings_titles.t

Signed-off-by: Clemens Tubach <clemens.tubach@kit.edu>
Comment 8 Nick Clemens (kidclamp) 2024-05-07 18:04:39 UTC
From what I see, before this patch the default is to create a bibliographic record when adding a title. This is a change of behavior as the default is now to not create the record. Is it intentional/is this the desired default?

When I create a title with no bibliographic record, then edit it, I see a button to:
Update linked biblio record
If I enabled this, then I create a record. I think this button should either say "Create biblio record" or not be present after I have chosen not to create a biblio the first time?

QA tools complain of tidiness
Comment 9 Matt Blenkinsop 2024-05-08 10:45:02 UTC
Created attachment 166380 [details] [review]
Bug 36618: Make biblio creation optional for ERM local titles

This patch makes biblio creation on local title creation optional.

Test plan:
1) Navigate to the local title creation form
2) Create a title and leave the "Create record" box unchecked
3) Submit the form
4) Search the catalogue for the title you have just created - no biblio result will be available
5) Repeat steps 2 - 3 but this time check the box to create a record
6) You should now be able to find a record in the catalogue for the title you just imported
Comment 10 Matt Blenkinsop 2024-05-08 10:45:05 UTC
Created attachment 166381 [details] [review]
Bug 36618: Add unit tests

prove t/db_dependent/api/v1/erm_eholdings_titles.t
Comment 11 Matt Blenkinsop 2024-05-08 10:45:07 UTC
Created attachment 166382 [details] [review]
Bug 36618: (QA follow-up) Hide option for titles with no linked record

This patch hides the "Update linked biblio" option for titles that have been created with no linked biblio record
Comment 12 Matt Blenkinsop 2024-05-08 10:46:49 UTC
I've fixed the tidying issues and changed it so that it hides the option to update the linked record when updating a title that doesn't have a linked record. I think it makes more sense that eventually the import tool in bug 34788 is expanded to be able to do batch record additions/updates for titles and it also avoids accidental creation of records in the short term
Comment 13 Nick Clemens (kidclamp) 2024-05-08 11:12:24 UTC
Created attachment 166386 [details] [review]
Bug 36618: Make biblio creation optional for ERM local titles

This patch makes biblio creation on local title creation optional.

Test plan:
1) Navigate to the local title creation form
2) Create a title and leave the "Create record" box unchecked
3) Submit the form
4) Search the catalogue for the title you have just created - no biblio result will be available
5) Repeat steps 2 - 3 but this time check the box to create a record
6) You should now be able to find a record in the catalogue for the title you just imported

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 14 Nick Clemens (kidclamp) 2024-05-08 11:12:27 UTC
Created attachment 166387 [details] [review]
Bug 36618: Add unit tests

prove t/db_dependent/api/v1/erm_eholdings_titles.t

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 15 Nick Clemens (kidclamp) 2024-05-08 11:12:29 UTC
Created attachment 166388 [details] [review]
Bug 36618: (QA follow-up) Hide option for titles with no linked record

This patch hides the "Update linked biblio" option for titles that have been created with no linked biblio record

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 16 Katrin Fischer 2024-05-08 17:32:56 UTC
1) Translatability

I don't believe that Update and Create will be picked up by the translation scripts in this construct:

+                    <legend>
+                        {{
+                            $__("%s linked biblio record").format(
+                                title.title_id ? "Update" : "Create"
+                            )
+                        }}:
+                    </legend>
+                    <label for="create_linked_biblio"
+                        >{{
+                            $__("%s record").format(
+                                title.title_id ? "Update" : "Create"
+                            )
+                        }}:</label
+                    >

Please follow-up!
Comment 17 Katrin Fischer 2024-05-08 17:50:40 UTC
In general, don't try to be too clever with things like that. It makes it harder to translate in the translations tools if you cut up sentences. Most of the time it's better to just have 2 full strings to translate because it adds context and looks less confusing in the tools.
Comment 18 Katrin Fischer 2024-05-08 18:06:17 UTC
Pushed for 24.05!

Well done everyone, thank you!