Bug 22451

Summary: Asset plugin is using the version from the DB
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Josef Moravec <josef.moravec>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: hayleypelham, josef.moravec, lucas, martin.renvoize, nick
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20658
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.05.00, 18.11.05
Bug Depends on: 20658    
Bug Blocks: 18308    
Attachments: Bug 22451: Make Asset plugin use Koha::version instead of version from db
Bug 22451: Update test
Bug 22451: Use Asset everywhere
Bug 22451: Make Asset plugin use Koha::version instead of version from db
Bug 22451: Update test
Bug 22451: Use Asset everywhere
Bug 22451: Make Asset plugin use Koha::version instead of version from db
Bug 22451: Update test
Bug 22451: Use Asset everywhere
Bug 22451: Make Asset plugin use Koha::version instead of version from db
Bug 22451: Update test
Bug 22451: Use Asset everywhere

Description Jonathan Druart 2019-03-04 18:51:29 UTC
Should not be retrieved with Koha::Version?

See bug 20658 comment 13.
Comment 1 Josef Moravec 2019-03-04 20:36:14 UTC
Created attachment 86034 [details] [review]
Bug 22451: Make Asset plugin use Koha::version instead of version from db

Test plan:
Apply the patch a try to use Koha, css and js files should be used
normally
Comment 2 Josef Moravec 2019-03-04 20:36:18 UTC
Created attachment 86035 [details] [review]
Bug 22451: Update test

Test plan:
prove t/db_dependent/Koha/Template/Plugin/Asset.t
Comment 3 Josef Moravec 2019-03-04 20:36:22 UTC
Created attachment 86036 [details] [review]
Bug 22451: Use Asset everywhere

Test plan:
Use installer and onboaarding tool, make sure the js and css files are
loaded
Comment 4 Jonathan Druart 2019-03-05 18:28:11 UTC
error: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/includes/installer-doc-head-close.inc).
Comment 5 Jonathan Druart 2019-03-05 18:44:44 UTC
1. I'd say there is a dot missing:
$1$2$3 should be $1.$2$3 to match the value in the DB

2. I do not understand the changes in the tests.
Comment 6 Josef Moravec 2019-03-05 19:30:11 UTC
Created attachment 86115 [details] [review]
Bug 22451: Make Asset plugin use Koha::version instead of version from db

Test plan:
Apply the patch a try to use Koha, css and js files should be used
normally
Comment 7 Josef Moravec 2019-03-05 19:30:15 UTC
Created attachment 86116 [details] [review]
Bug 22451: Update test

Test plan:
prove t/db_dependent/Koha/Template/Plugin/Asset.t
Comment 8 Josef Moravec 2019-03-05 19:30:19 UTC
Created attachment 86117 [details] [review]
Bug 22451: Use Asset everywhere

Test plan:
Use installer and onboaarding tool, make sure the js and css files are
loaded
Comment 9 Josef Moravec 2019-03-05 19:31:33 UTC
(In reply to Jonathan Druart from comment #5)
> 1. I'd say there is a dot missing:
> $1$2$3 should be $1.$2$3 to match the value in the DB
$1 is for first two version parts with dot... so dot is here, but I agree it is not obvious... maybe better to format regex with 4 parts to make it better readable - i updated the first patch
> 
> 2. I do not understand the changes in the tests.

When database is not fully updated, then the test could fail if using version preference... maybe a bit
Comment 10 Hayley Pelham 2019-04-11 22:54:55 UTC
Created attachment 87821 [details] [review]
Bug 22451: Make Asset plugin use Koha::version instead of version from db

Test plan:
Apply the patch a try to use Koha, css and js files should be used
normally

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Comment 11 Hayley Pelham 2019-04-11 22:55:24 UTC
Created attachment 87822 [details] [review]
Bug 22451: Update test

Test plan:
prove t/db_dependent/Koha/Template/Plugin/Asset.t

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Comment 12 Hayley Pelham 2019-04-11 22:55:57 UTC
Created attachment 87823 [details] [review]
Bug 22451: Use Asset everywhere

Test plan:
Use installer and onboaarding tool, make sure the js and css files are
loaded

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Comment 13 Katrin Fischer 2019-04-12 12:35:32 UTC
Created attachment 87897 [details] [review]
Bug 22451: Make Asset plugin use Koha::version instead of version from db

Test plan:
Apply the patch a try to use Koha, css and js files should be used
normally

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 14 Katrin Fischer 2019-04-12 12:35:37 UTC
Created attachment 87899 [details] [review]
Bug 22451: Update test

Test plan:
prove t/db_dependent/Koha/Template/Plugin/Asset.t

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 15 Katrin Fischer 2019-04-12 12:35:40 UTC
Created attachment 87900 [details] [review]
Bug 22451: Use Asset everywhere

Test plan:
Use installer and onboaarding tool, make sure the js and css files are
loaded

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 16 Nick Clemens 2019-04-16 13:26:21 UTC
Awesome work all!

Pushed to master for 19.05
Comment 17 Martin Renvoize 2019-04-25 13:29:06 UTC
Pushed to 18.11.x for 18.11.05
Comment 18 Lucas Gass 2019-04-26 15:59:36 UTC
missing dependency for 18.05.x, not backporting