[Koha-bugs] [Bug 13897] Use YAML files for installer data
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Feb 21 17:20:23 CET 2020
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13897
Martin Renvoize <martin.renvoize at ptfs-europe.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #98507|0 |1
is obsolete| |
--- Comment #56 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
Created attachment 99394
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99394&action=edit
Bug 13897: Process description, multiline values and SQL statements in YAML
files
This patch adds 3 features:
1) Display description of YAML files at install time
for frameworks, and fixes it's encoding.
2) Enable use of multiline values, field required
3) Process SQL statements declared in YAML files
With this features we can process files with the
following generic YAML strucure:
---
description:
- "File description"
tables:
- table_name:
translatable: [ title, content ]
multiline: [ content ]
rows:
- title: "Example title"
content:
- "Content:"
- ""
- "This is the content."
id: 1
value: ~
sql_statements:
- "UPDATE table_name SET value ='empty' WHERE value IS NULL"
...
* file description is now inside the YAML, can have multiple
lines.
This attribute is expected in all YAML files.
* translatable attribute in table declare fields that can be
translated
* multiline attribute in table declare fields that can have
multiple lines of content, they are joined using '\r\n'
before insert into database.
This is useful to express fields like 'news' content, and
to simplify it's translation.
'\r\n' is used for correct display in Windows clients.
* sql_statements allows to add multiple SQL sentences, not
insertions normally, that are executed in order.
This features are not needed for the example file of this patch,
but will be used in new bugs.
To test:
1) Use the same test plan of first patch.
Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list