https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22994

Pedro Amorim (ammopt) <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]
                   |                            |k
             Status|Passed QA                   |Failed QA

--- Comment #12 from Pedro Amorim (ammopt) <[email protected]> ---
Hi all, a few things worth fixing.

Setup: apply the patches, then: yarn api:bundle && restart_all

Blocker 1) Importing right after saving is silently undone
After the import, the page calls location.reload(). If the page is the result
of the 'Save' POST, the reload re-submits that form, so the previous mappings
overwrite the imported ones.
A) Open
http://localhost:8081/cgi-bin/koha/admin/searchengine/elasticsearch/mappings.pl
and click 'Export mappings'
B) Change the label of 'title-abbreviated' to 'Changed', click 'Save'
C) Click 'Import mappings', select the file from A), click 'Import'
D) Paste
http://localhost:8081/cgi-bin/koha/admin/searchengine/elasticsearch/mappings.pl
into the address bar and press Enter (a browser refresh would re-send the form)
E) Notice the label is still 'Changed', not 'title-abbreviated' from the file

Blocker 2) Importing a YAML file corrupts non-ASCII labels
A) Open
http://localhost:8081/cgi-bin/koha/admin/searchengine/elasticsearch/mappings.pl,
change the label of 'title-abbreviated' to 'Título', click 'Save'
B) Paste
http://localhost:8081/cgi-bin/koha/admin/searchengine/elasticsearch/mappings.pl
into the address bar and press Enter (so blocker 1 doesn't re-send the 'Save'
from step A), click 'Export mappings'.
C) Click 'Import mappings', select the downloaded search_mappings.yaml, click
'Import'
D) Paste
http://localhost:8081/cgi-bin/koha/admin/searchengine/elasticsearch/mappings.pl
into the address bar and press Enter. Notice the label is now 'Título'
SearchMappings.pm runs YAML::XS::Load( Encode::encode_utf8($body) ), but
$c->req->body is already bytes, so the content is encoded twice. JSON imports
aren't affected.

Not a blocker, worth a follow-up: the import only checks that the file is a
hash, so a file containing only {} removes every search field and mapping and
reports success.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to