Bug 29405 - The patron spec for date_renewed is missing it's format definition
Summary: The patron spec for date_renewed is missing it's format definition
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: REST API (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial (vote)
Assignee: Martin Renvoize
QA Contact: Tomás Cohen Arazi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-03 13:47 UTC by Martin Renvoize
Modified: 2022-12-12 21:24 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fix adds the date format string to the date_renewed field. This is to ensure that the date_renewed field can be correctly validated.
Version(s) released in:
21.11.00,21.05.05,20.11.12


Attachments
Bug 29405: Fix spec (853 bytes, patch)
2021-11-03 13:48 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 29405: Fix spec (902 bytes, patch)
2021-11-07 21:44 UTC, David Nind
Details | Diff | Splinter Review
Bug 29405: Fix date_renewed attribute format in patron spec (997 bytes, patch)
2021-11-08 12:15 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize 2021-11-03 13:47:03 UTC
As the title says
Comment 1 Martin Renvoize 2021-11-03 13:48:32 UTC
Created attachment 127260 [details] [review]
Bug 29405: Fix spec

This patch just adds the 'date' format string to ensure we are
validating the input/output of the date_renewed field correctly.
Comment 2 David Nind 2021-11-07 21:44:46 UTC
Created attachment 127417 [details] [review]
Bug 29405: Fix spec

This patch just adds the 'date' format string to ensure we are
validating the input/output of the date_renewed field correctly.

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2021-11-07 21:51:50 UTC
This is how I tested using koha-testing-docker - hope this is sufficient!

Test plan:

1. Search http://127.0.0.1:8080/api/v1/.html for date_renewed

2. You should find seven occurrences displayed like this (note that other date fields have a line with "format": "date", as part of their definition):

   "date_renewed": {
          "description": "date the patron's card was last renewed",
          "type": [
            "string",
            "null"
          ]
        },

3. Apply the patch.

4. Reload the page in step 1 and search again for date_rendered. The seven occurrences should now include "format": "date", :

   "date_renewed": {
          "description": "date the patron's card was last renewed",
          "format": "date",
          "type": [
            "string",
            "null"
          ]
        },
      
5. Sign off!
Comment 4 Tomás Cohen Arazi 2021-11-08 12:15:23 UTC
Created attachment 127445 [details] [review]
Bug 29405: Fix date_renewed attribute format in patron spec

This patch just adds the 'date' format string to ensure we are
validating the input/output of the date_renewed field correctly.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 5 Jonathan Druart 2021-11-15 11:40:22 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 6 Kyle M Hall 2021-11-19 16:38:35 UTC
Pushed to 21.05.x for 21.05.05
Comment 7 Fridolin Somers 2021-11-20 00:17:20 UTC
Pushed to 20.11.x for 20.11.12
Comment 8 Victor Grousset/tuxayo 2021-11-22 01:44:07 UTC
Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed.