Koha/C4
Agustin Moyano 8b3a108558 Bug 23019: Add profiles to stage-import-batch and magnage-import-batch pages
This patch adds the logic and the needed UI elements to be able to pre-load an import profile. It also displays which profile was used to stage an import in staged import manager.

To test:
1. Apply all patches
2. Updatedatabase
3. Go to Stage MARC records for Import tool in admin, and upload a file with MARC records.
CHECK => after uploading, there is a fieldset with the legend “Profile settings”
              => inside the fieldset there is a select labeled “Pre fill values with profile”. The only value it has is “Do not use profile”.

4. Change some settings, and set “profile 1” as profile name and click on “Add profile”
SUCCESS => The select now has the new profile selected

5. Change profile select to “Do not use profile”
SUCCESS => Default values are now displayed in the form

6. Reload the page and upload the file again
SUCCESS => the select still has the profile recently added

7. Select the profile, change some parameter in the form and set the profile name to “profile 2”, and click add profile
SUCCESS => there are two profiles now, and if you toggle between them, the parameter changes

8. Select profile 1, change one parameter and click on update profile
SUCCESS => if you toggle that profile with the other, the new parameter of the value is shown when you select profile 1

9. Select profile 2, change some parameter and click Add profile (leaving the name as profile 2)
SUCCESS => the page complains there is another profile with the same name, and asks if you want to replace it.

10. Click on accept
SUCCESS => profile 2 now has the new value in the parameter

11. Select profile 2 and change the name to profile 1
SUCCESS => the page complains there is another profile with that name, and asks if you want to replace it

12. Click on accept
SUCCESS => in profile select there is only one profile called profile 1 that has the values of profile 2

13. Select profile 1 and click remove profile
SUCCESS => there is no profile in profile select.

14. Create a profile and click on “Stage for import”
15. Go to Staged MARC management page
SUCCESS => Improt should have the name of the profile in profile column, and when you click on the file name, there should be the name of the profile in the details.

16. prove t/db_dependent/ImportBatch.t t/db_dependent/api/v1/import_batch_profiles.t
17. Sign off

Signed-off-by: Abbey Holt <aholt@dubuque.lib.ia.us>

Signed-off-by: Abbey Holt <aholt@dubuque.lib.ia.us>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-11 15:55:49 +01:00
..
AuthoritiesMarc Bug 24217: use Modern::Perl for modules when strict is missing 2020-01-03 10:45:46 +00:00
Barcodes Bug 26673: Fix perlcritic complains 2020-11-02 08:42:20 +01:00
ClassSortRoutine
ClassSplitRoutine Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
Creators Bug 25852: Improve C4::Creators::Lib reliability under plack 2020-07-31 10:03:26 +02:00
External Bug 22010: Check preferences for ebook integration 2019-04-30 11:42:51 +00:00
Form Bug 16259: Replace CGI->param with CGI->multi_param in list context - part 2 2016-05-16 17:28:06 +00:00
Heading Bug 24269: Adjust C4::Heading to generate headings from auth tags 2020-02-19 13:33:32 +00:00
ILSDI Bug 25650: Add location and itype descriptions in ILS-DI GetRecords 2020-11-05 15:24:20 +01:00
Installer Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Labels Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
Linker Bug 25189: Don't create authority if results found 2020-06-24 14:31:37 +02:00
Members Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
OAI Bug 25460: Update OAI sets when adding/editing/deleting item records 2020-10-15 12:56:30 +02:00
Output
Patroncards Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
Reports Bug 22001: execute reports in an eval 2020-03-31 17:48:14 +01:00
Search Bug 24217: use Modern::Perl for modules when strict is missing 2020-01-03 10:45:46 +00:00
Serials
SIP Bug 26896: Enable SIP option holds_block_checkin to actually block checkin of items with holds 2020-11-03 11:07:22 +01:00
Utils Bug 15400: Display date of birth and age more consistantly 2020-06-29 12:37:02 +02:00
Accounts.pm Bug 22394: Remove C4::Accounts::manualinvoice 2020-11-04 12:59:33 +01:00
Acquisition.pm Bug 26584: Remove unused C4::Acquisition::CloseBasket function 2020-11-05 15:24:20 +01:00
Auth.pm Bug 24786: Default to 'branch default' on auth. 2020-11-06 15:40:00 +01:00
Auth_cas_servers.yaml.sample Bug 17065 - Rename C4/Auth_cas_servers.yaml.orig 2016-08-08 13:16:36 +00:00
Auth_with_cas.pm Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
Auth_with_ldap.pm Bug 20443: Use search_with_library_limits for attribute types 2020-03-23 13:49:22 +00:00
Auth_with_shibboleth.pm Bug 24199: (bug 23042 follow-up) Prevent t/Auth_with_shibboleth.t to fail randomly 2019-12-10 10:43:20 +00:00
AuthoritiesMarc.pm Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
BackgroundJob.pm Bug 24217: use Modern::Perl for modules when strict is missing 2020-01-03 10:45:46 +00:00
Barcodes.pm
Biblio.pm Bug 26641: pass the MARC field as an argument to link_bibs_to_authorities.pl 2020-11-04 12:59:34 +01:00
Boolean.pm
Breeding.pm Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
Budgets.pm Bug 24361: (bug 24217 follow-up) Fix several warnings in C4 modules 2020-01-07 13:59:51 +00:00
Calendar.pm Bug 25723: (QA follow-up) Handle holiday and exception on same day 2020-07-20 17:45:31 +02:00
Charset.pm Bug 22721: Remove frameworkcode parameter in GetMarcFromKohaField calls 2019-07-15 11:28:08 +01:00
Circulation.pm Bug 23916: (QA follow-up) Adapt all the things to the new column and accessor names 2020-11-10 15:00:14 +01:00
ClassSortRoutine.pm Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
ClassSource.pm Bug 15836: Remove deprecated subroutines 2018-11-13 18:56:18 +00:00
ClassSplitRoutine.pm Bug 15836: Add the ability to defined custom methods to split call number in labels 2018-11-13 15:18:22 +00:00
Context.pm Bug 24786: (follow-up) Cache the register_name in the session 2020-11-06 15:40:00 +01:00
Contract.pm Bug 24217: use Modern::Perl for modules when strict is missing 2020-01-03 10:45:46 +00:00
CourseReserves.pm Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
Creators.pm Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
Debug.pm
Heading.pm Bug 24269: Adjust C4::Heading to generate headings from auth tags 2020-02-19 13:33:32 +00:00
HoldsQueue.pm Bug 26510: Transport Cost Matrix editor doesn't show all data when HoldsQueueSkipClosed is enabled 2020-09-28 10:10:02 +02:00
HTML5Media.pm Bug 20783: Use iframe to embed Youtube videos 2020-06-15 10:32:43 +02:00
ImportBatch.pm Bug 23019: Add profiles to stage-import-batch and magnage-import-batch pages 2020-11-11 15:55:49 +01:00
ImportExportFramework.pm Bug 18143: Silence ods MARC framework export flood 2019-02-19 13:52:15 +00:00
InstallAuth.pm Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
Installer.pm Bug 23895: Move installer file into the mandatory directory 2020-10-14 14:50:07 +02:00
ItemCirculationAlertPreference.pm
Items.pm Bug 20888: (follow-up) 'is not' operator behaves as 'not like' 2020-11-04 12:59:33 +01:00
Koha.pm Bug 16371: Move GetDailyQuote to get_daily_quote 2020-08-13 10:15:33 +02:00
Labels.pm Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
Languages.pm Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
Letters.pm Bug 22818: (follow-up) Respond to feedback 2020-11-11 08:35:10 +01:00
Linker.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Log.pm Bug 23632: Remove C4::Logs::GetLogs 2020-08-18 15:45:48 +02:00
MarcModificationTemplates.pm Bug 24840: Replace DateTime->now with dt_from_string 2020-04-08 11:54:23 +01:00
Matcher.pm Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
Members.pm Bug 23916: (follow-up) Adapt all the things to the new column and accessor names 2020-11-10 15:00:14 +01:00
Message.pm Bug 21206: Replace C4::Items::GetItem 2019-02-26 13:24:07 +00:00
NewsChannels.pm Bug 21066: Rename publicationdate with published_on 2020-09-02 15:35:08 +02:00
Output.pm Bug 11994: OpenSearch plugins needs to be delivered with Content-Type application/opensearchdescription+xml 2020-06-24 14:31:37 +02:00
Overdues.pm Bug 25127: Use Koha::Number::Price->round for comparison 2020-05-01 15:44:55 +01:00
Patroncards.pm Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
Record.pm Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
Reports.pm Bug 24217: use Modern::Perl for modules when strict is missing 2020-01-03 10:45:46 +00:00
Reserves.pm Bug 24412: Attach waiting reserve to desk 2020-11-06 15:55:17 +01:00
Ris.pm Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
RotatingCollections.pm Bug 12556: (QA follow-up) Fix QA Script failures 2020-10-14 14:50:07 +02:00
Scheduler.pm Bug 24217: use Modern::Perl for modules when strict is missing 2020-01-03 10:45:46 +00:00
Scrubber.pm
Search.pm Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
Serials.pm Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
Service.pm Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
ShelfBrowser.pm Bug 26673: Remove shebangs from Perl modules 2020-10-26 00:14:42 +01:00
SMS.pm Bug 19134: C4::SMS falils on long driver name 2017-08-25 10:51:24 -03:00
SocialData.pm Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00
Stats.pm Bug 24151: Copy info to the pseudonymized table when a transaction is done 2020-07-20 15:17:42 +02:00
Suggestions.pm Bug 25033: Remove CountSuggestion 2020-08-25 11:31:41 +02:00
Tags.pm Bug 23084: Replace grep {^$var$} with grep {$_ eq $var} 2020-02-17 10:44:45 +00:00
Templates.pm Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
TmplToken.pm
TmplTokenType.pm Bug 24217: use Modern::Perl for modules when strict is missing 2020-01-03 10:45:46 +00:00
TTParser.pm Bug 26673: Remove #!/usr/bin/env perl from .pm modules too 2020-10-26 00:14:42 +01:00
UsageStats.pm Bug 23420: (QA follow-up) Remove more AllowPurchaseSuggestionBranchChoice code 2020-10-09 12:22:01 +02:00
XISBN.pm Bug 26270: Fix ThingISBN after a change in behaviour 2020-08-24 10:12:47 +02:00
XSLT.pm Bug 24052: Rename XSLT_Handler 2020-03-24 10:42:23 +00:00