Bug 21502

Summary: Add checks for YAML formatted system preferences to about page
Product: Koha Reporter: Josef Moravec <josef.moravec>
Component: AboutAssignee: Josef Moravec <josef.moravec>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: katrin.fischer, martin.renvoize, nick, severine.queune
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16698
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20930
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
This enhancement adds a warning to the about pages for any malformed yaml system preferences.
Version(s) released in:
19.05.00
Bug Depends on: 14576    
Bug Blocks:    
Attachments: Bug 21502: Add check for YAML formatted system preferences to about page
Bug 21502: Add UpdateItemLocationOnCheckin preference to YAML format check
Bug 21502: Add check for YAML formatted system preferences to about page
Bug 21502: Add UpdateItemLocationOnCheckin preference to YAML format check
Bug 21502: Add check for YAML formatted system preferences to about page
Bug 21502: Add UpdateItemLocationOnCheckin preference to YAML format check
Bug 21502: Add ItemsDeniedRenewal system preference to check syntax
Bug 21502: Add check for YAML formatted system preferences to about page
Bug 21502: Add UpdateItemLocationOnCheckin preference to YAML format check
Bug 21502: Add ItemsDeniedRenewal system preference to check syntax
Bug 21502: Add check for YAML formatted system preferences to about page
Bug 21502: Add UpdateItemLocationOnCheckin preference to YAML format check
Bug 21502: Add ItemsDeniedRenewal system preference to check syntax
Bug 21502: (QA follow-up) Rephrase warning slightly

Description Josef Moravec 2018-10-05 13:50:32 UTC

    
Comment 1 Josef Moravec 2018-10-05 14:03:59 UTC
Created attachment 80085 [details] [review]
Bug 21502: Add check for YAML formatted system preferences to about page

So far there are these yaml formatted preferences:
    UpdateNotForLoanStatusOnCheckin
    OpacHiddenItems
    BibtexExportAdditionalFields
    RisExportAdditionalFields
    UpdateItemWhenLostFromHoldList
    MarcFieldsToOrder
    MarcItemFieldsToOrder

Test plan:
1) Add some badly formatted YAML into some of preferences listed above
2) Check the System information tab on About page for appropriate warnings
Comment 2 Josef Moravec 2018-10-05 14:04:03 UTC
Created attachment 80086 [details] [review]
Bug 21502: Add UpdateItemLocationOnCheckin preference to YAML format check
Comment 3 Owen Leonard 2018-10-05 15:59:20 UTC
I have one line in my  UpdateItemLocationOnCheckin preference:

PROC: APL-PROMO

And I get the message that it is badly-formatted. Shouldn't that pass?
Comment 4 Josef Moravec 2018-10-10 15:18:00 UTC
Created attachment 80360 [details] [review]
Bug 21502: Add check for YAML formatted system preferences to about page

So far there are these yaml formatted preferences:
    UpdateNotForLoanStatusOnCheckin
    OpacHiddenItems
    BibtexExportAdditionalFields
    RisExportAdditionalFields
    UpdateItemWhenLostFromHoldList
    MarcFieldsToOrder
    MarcItemFieldsToOrder

Test plan:
1) Add some badly formatted YAML into some of preferences listed above
2) Check the System information tab on About page for appropriate warnings
Comment 5 Josef Moravec 2018-10-10 15:18:05 UTC
Created attachment 80362 [details] [review]
Bug 21502: Add UpdateItemLocationOnCheckin preference to YAML format check
Comment 6 Séverine Queune 2019-02-27 11:18:06 UTC
I don't have the 'UpdateItemLocationOnCheckin' preference that Owen mentioned, and no trace on Koha manual.
I don't have alert for the ItemsDeniedRenewal pref, isn't that YAML too ?
Comment 7 Katrin Fischer 2019-02-27 13:18:58 UTC
(In reply to Séverine Queune from comment #6)
> I don't have the 'UpdateItemLocationOnCheckin' preference that Owen
> mentioned, and no trace on Koha manual.
> I don't have alert for the ItemsDeniedRenewal pref, isn't that YAML too ?

Hi Severine, the first will be added by the bug this depends on, so you need to apply both and run updatedatabase.
Comment 8 Séverine Queune 2019-02-27 14:13:15 UTC
(In reply to Katrin Fischer from comment #7)
> (In reply to Séverine Queune from comment #6)
> > I don't have the 'UpdateItemLocationOnCheckin' preference that Owen
> > mentioned, and no trace on Koha manual.
> > I don't have alert for the ItemsDeniedRenewal pref, isn't that YAML too ?
> 
> Hi Severine, the first will be added by the bug this depends on, so you need
> to apply both and run updatedatabase.

Argh... completely missed the dependency, sorry about that...
Comment 9 Josef Moravec 2019-04-23 12:29:19 UTC
Created attachment 88462 [details] [review]
Bug 21502: Add check for YAML formatted system preferences to about page

So far there are these yaml formatted preferences:
    UpdateNotForLoanStatusOnCheckin
    OpacHiddenItems
    BibtexExportAdditionalFields
    RisExportAdditionalFields
    UpdateItemWhenLostFromHoldList
    MarcFieldsToOrder
    MarcItemFieldsToOrder

Test plan:
1) Add some badly formatted YAML into some of preferences listed above
2) Check the System information tab on About page for appropriate warnings
Comment 10 Josef Moravec 2019-04-23 12:29:22 UTC
Created attachment 88463 [details] [review]
Bug 21502: Add UpdateItemLocationOnCheckin preference to YAML format check
Comment 11 Josef Moravec 2019-04-23 12:29:25 UTC
Created attachment 88464 [details] [review]
Bug 21502: Add ItemsDeniedRenewal system preference to check syntax
Comment 12 Michal Denar 2019-04-23 19:37:49 UTC
Created attachment 88562 [details] [review]
Bug 21502: Add check for YAML formatted system preferences to about page

So far there are these yaml formatted preferences:
    UpdateNotForLoanStatusOnCheckin
    OpacHiddenItems
    BibtexExportAdditionalFields
    RisExportAdditionalFields
    UpdateItemWhenLostFromHoldList
    MarcFieldsToOrder
    MarcItemFieldsToOrder

Test plan:
1) Add some badly formatted YAML into some of preferences listed above
2) Check the System information tab on About page for appropriate warnings

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 13 Michal Denar 2019-04-23 19:37:52 UTC
Created attachment 88563 [details] [review]
Bug 21502: Add UpdateItemLocationOnCheckin preference to YAML format check

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 14 Michal Denar 2019-04-23 19:37:56 UTC
Created attachment 88564 [details] [review]
Bug 21502: Add ItemsDeniedRenewal system preference to check syntax

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 15 Katrin Fischer 2019-04-24 21:04:58 UTC
Created attachment 88655 [details] [review]
Bug 21502: Add check for YAML formatted system preferences to about page

So far there are these yaml formatted preferences:
    UpdateNotForLoanStatusOnCheckin
    OpacHiddenItems
    BibtexExportAdditionalFields
    RisExportAdditionalFields
    UpdateItemWhenLostFromHoldList
    MarcFieldsToOrder
    MarcItemFieldsToOrder

Test plan:
1) Add some badly formatted YAML into some of preferences listed above
2) Check the System information tab on About page for appropriate warnings

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 16 Katrin Fischer 2019-04-24 21:05:02 UTC
Created attachment 88656 [details] [review]
Bug 21502: Add UpdateItemLocationOnCheckin preference to YAML format check

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 17 Katrin Fischer 2019-04-24 21:05:06 UTC
Created attachment 88657 [details] [review]
Bug 21502: Add ItemsDeniedRenewal system preference to check syntax

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 18 Katrin Fischer 2019-04-24 21:57:36 UTC
Created attachment 88664 [details] [review]
Bug 21502: (QA follow-up) Rephrase warning slightly

Test plan:
Follow first test plan, look at warning, decide if you like it :)
Comment 19 Nick Clemens 2019-04-29 16:20:28 UTC
Awesome work all!

Pushed to master for 19.05
Comment 20 Martin Renvoize 2019-05-08 14:05:17 UTC
Enhancement will not be backported to 18.11.x series