Summary: | IdRef link appears even with syspref is off | ||
---|---|---|---|
Product: | Koha | Reporter: | Fridolin Somers <fridolin.somers> |
Component: | OPAC | Assignee: | Fridolin Somers <fridolin.somers> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | 1joynelson, bgkriegel, hayleypelham, lucas, martin.renvoize |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
20.05.00, 19.11.05, 19.05.10
|
|
Circulation function: | |||
Bug Depends on: | 8992 | ||
Bug Blocks: | |||
Attachments: |
Bug 23383: fix IdRef syspref test in XSLT
Bug 23383: fix IdRef syspref test in XSLT Bug 23383: fix IdRef syspref test in XSLT |
Description
Fridolin Somers
2019-07-26 13:29:04 UTC
Created attachment 91812 [details] [review] Bug 23383: fix IdRef syspref test in XSLT IdRef link is displayed via XSLT. There is a test of syspref with just if value is defined. But in installer/data/mysql/sysprefs.sql you see this pref will be 0 by default, which is true in XPATH. We should test that pref is 1. Test plan : 1) Create a fresh UNIMARC database 2) You have pref IdRef disabled 3) Simulate a SUDOC record: Fill a 7..$3 field with a ppn (032581270 for example). Fill the 009 field with an integer 4) Go to the opac detail page of the record => You don't see IdRef link 5) Enable IdRef syspref 6) Go to the opac detail page of the record => You see IdRef link 7) Disable IdRef syspref 8) Go to the opac detail page of the record => You don't see IdRef link Hi, testing this. Patch is simple and syntactically correct. What framework are you using? With english or unimarc_complete (fr-FR) field 009 is hidden. Are you using another one? Created attachment 100329 [details] [review] Bug 23383: fix IdRef syspref test in XSLT IdRef link is displayed via XSLT. There is a test of syspref with just if value is defined. But in installer/data/mysql/sysprefs.sql you see this pref will be 0 by default, which is true in XPATH. We should test that pref is 1. Test plan : 1) Create a fresh UNIMARC database 2) You have pref IdRef disabled 3) Simulate a SUDOC record: Fill a 7..$3 field with a ppn (032581270 for example). Fill the 009 field with an integer 4) Go to the opac detail page of the record => You don't see IdRef link 5) Enable IdRef syspref 6) Go to the opac detail page of the record => You see IdRef link 7) Disable IdRef syspref 8) Go to the opac detail page of the record => You don't see IdRef link Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Nice catch Fridolin, Code scans well and I believe would do as expected. I agree, looking at the code Bernardo's point makes sense.. I don't have Unimarc test set here so haven't directly tested but I can't see that though would cause a negative regression so am signing off anyway to let it move forward. Created attachment 100588 [details] [review] Bug 23383: fix IdRef syspref test in XSLT IdRef link is displayed via XSLT. There is a test of syspref with just if value is defined. But in installer/data/mysql/sysprefs.sql you see this pref will be 0 by default, which is true in XPATH. We should test that pref is 1. Test plan : 1) Create a fresh UNIMARC database 2) You have pref IdRef disabled 3) Simulate a SUDOC record: Fill a 7..$3 field with a ppn (032581270 for example). Fill the 009 field with an integer 4) Go to the opac detail page of the record => You don't see IdRef link 5) Enable IdRef syspref 6) Go to the opac detail page of the record => You see IdRef link 7) Disable IdRef syspref 8) Go to the opac detail page of the record => You don't see IdRef link Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Nice work everyone! Pushed to master for 20.05 Backported to 19.11.x branch for 19.11.05 backported to 19.05.x for 19.05.10 Minor/normal patch will not be backported to 18.11.x series |