[Bug 41107] New: Create an API endpoint to get Koha version
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41107 Bug ID: 41107 Summary: Create an API endpoint to get Koha version Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: REST API Assignee: koha-bugs@lists.koha-community.org Reporter: andrew@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: tomascohen@gmail.com It would be helpful to have an API endpoint from which to get the Koha version of a system -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41107 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41107 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41107 --- Comment #1 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 189072 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189072&action=edit Bug 41107: Add /status/version API endpoint Adds a new REST API endpoint to retrieve Koha version information. This implementation includes: - Koha::Status class for instance status information - /status/version endpoint returning structured version data - OpenAPI specification with koha_version definition - REST controller for handling the endpoint The returned version object includes: - version: full version string (e.g., '25.06.00.029') - major: major version number - minor: minor version number - release: major.minor version - maintenance: major.minor.maintenance version - development: development version (if applicable) This prepares the foundation for a future /status endpoint that will include all information displayed in the about page. To test: 1. Apply the patch 2. Run: $ ktd --shell k$ yarn api:bundle 3. Run the tests: k$ prove t/Koha/Status.t \ t/db_dependent/api/v1/status.t => SUCCESS: Tests pass! 4. Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41107 --- Comment #2 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 189073 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189073&action=edit Bug 41107: (follow-up) Use Koha::Status in Koha::Template::Plugin::Koha This patch makes the template plugin used for rendering the Koha version use the introduced method. I did this checks: ```shell cd koha-tmpl git grep Koha.Version ``` The places Koha.Version is used, it is used as: * `Koha.Version.maintenance` * `Koha.Version.release` * Assigned to a variable like this `SET koha_version = Koha.Version` All occurences of the `koha_version` template variable are: * `koha_version.development` * `koha_version.major` * `koha_version.minor` This implies the newly added `.version` attribute has no undesired side effects in templates. Note: plugins-home.tt has a different use of a variable named the same, which is unrelated. To test: 1. Apply this patch 2. Run: $ ktd --shell k$ prove t/Koha_Template_Plugin_Koha.t => SUCCESS: Tests pass! 3. Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41107 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41107 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189072|0 |1 is obsolete| | --- Comment #3 from David Nind <david@davidnind.com> --- Created attachment 190029 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190029&action=edit Bug 41107: Add /status/version API endpoint Adds a new REST API endpoint to retrieve Koha version information. This implementation includes: - Koha::Status class for instance status information - /status/version endpoint returning structured version data - OpenAPI specification with koha_version definition - REST controller for handling the endpoint The returned version object includes: - version: full version string (e.g., '25.06.00.029') - major: major version number - minor: minor version number - release: major.minor version - maintenance: major.minor.maintenance version - development: development version (if applicable) This prepares the foundation for a future /status endpoint that will include all information displayed in the about page. To test: 1. Apply the patch 2. Run: $ ktd --shell k$ yarn api:bundle 3. Run the tests: k$ prove t/Koha/Status.t \ t/db_dependent/api/v1/status.t => SUCCESS: Tests pass! 4. Sign off :-D Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41107 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189073|0 |1 is obsolete| | --- Comment #4 from David Nind <david@davidnind.com> --- Created attachment 190030 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190030&action=edit Bug 41107: (follow-up) Use Koha::Status in Koha::Template::Plugin::Koha This patch makes the template plugin used for rendering the Koha version use the introduced method. I did this checks: ```shell cd koha-tmpl git grep Koha.Version ``` The places Koha.Version is used, it is used as: * `Koha.Version.maintenance` * `Koha.Version.release` * Assigned to a variable like this `SET koha_version = Koha.Version` All occurences of the `koha_version` template variable are: * `koha_version.development` * `koha_version.major` * `koha_version.minor` This implies the newly added `.version` attribute has no undesired side effects in templates. Note: plugins-home.tt has a different use of a variable named the same, which is unrelated. To test: 1. Apply this patch 2. Run: $ ktd --shell k$ prove t/Koha_Template_Plugin_Koha.t => SUCCESS: Tests pass! 3. Sign off :-D Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41107 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41107 Michael Grgurev <mike.grgurev@mainlib.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mike.grgurev@mainlib.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41107 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |kyle@bywatersolutions.com |y.org | CC| |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41107 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41107 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190029|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41107 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190030|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41107 --- Comment #5 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 193589 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193589&action=edit Bug 41107: Add /status/version API endpoint Adds a new REST API endpoint to retrieve Koha version information. This implementation includes: - Koha::Status class for instance status information - /status/version endpoint returning structured version data - OpenAPI specification with koha_version definition - REST controller for handling the endpoint The returned version object includes: - version: full version string (e.g., '25.06.00.029') - major: major version number - minor: minor version number - release: major.minor version - maintenance: major.minor.maintenance version - development: development version (if applicable) This prepares the foundation for a future /status endpoint that will include all information displayed in the about page. To test: 1. Apply the patch 2. Run: $ ktd --shell k$ yarn api:bundle 3. Run the tests: k$ prove t/Koha/Status.t \ t/db_dependent/api/v1/status.t => SUCCESS: Tests pass! 4. Sign off :-D Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41107 --- Comment #6 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 193590 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193590&action=edit Bug 41107: (follow-up) Use Koha::Status in Koha::Template::Plugin::Koha This patch makes the template plugin used for rendering the Koha version use the introduced method. I did this checks: ```shell cd koha-tmpl git grep Koha.Version ``` The places Koha.Version is used, it is used as: * `Koha.Version.maintenance` * `Koha.Version.release` * Assigned to a variable like this `SET koha_version = Koha.Version` All occurences of the `koha_version` template variable are: * `koha_version.development` * `koha_version.major` * `koha_version.minor` This implies the newly added `.version` attribute has no undesired side effects in templates. Note: plugins-home.tt has a different use of a variable named the same, which is unrelated. To test: 1. Apply this patch 2. Run: $ ktd --shell k$ prove t/Koha_Template_Plugin_Koha.t => SUCCESS: Tests pass! 3. Sign off :-D Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41107 --- Comment #7 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 193591 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193591&action=edit Bug 41107: (QA follow-up) tidy status.t Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41107 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |release-notes-needed CC| |lucas@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41107 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|release-notes-needed | Text to go in the| |This enhancement adds a new release notes| |REST API endpoint to | |retrieve Koha version | |information. The returned | |version object includes the | |full version string (e.g., | |'25.06.00.029') as well as | |its constituent parts: | |major version number, minor | |version number, release | |number, maintenance version | |number, and development | |version number (if | |applicable). This prepares | |the foundation for a future | |/status endpoint that will | |include all information | |displayed in the About | |page. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41107 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |26.05.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41107 --- Comment #8 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Thanks for all the hard work! Pushed to main for the next 26.05.00 release as RM Assistant -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41107 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Needs documenting --- Comment #9 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- This will not be backported to 25.11.x due to it being deemed an enhancement or a dependancy not being met -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org