[Bug 28585] New: Bug in GET /patrons by date_of_birth
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 Bug ID: 28585 Summary: Bug in GET /patrons by date_of_birth Change sponsored?: --- Product: Koha Version: 21.05 Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: REST API Assignee: koha-bugs@lists.koha-community.org Reporter: hannamari.h.heiniluoma@jyu.fi Querying patrons by their date_of_birth returns an empty response, even though there are patrons with that date of birth in the database. Might be a bug? -- 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=28585 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Hanna, could you include a sample for your query? Which date format was used? -- 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=28585 --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Katrin Fischer from comment #1)
Hi Hanna, could you include a sample for your query? Which date format was used?
Sorry, Hannamari! -- 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=28585 --- Comment #3 from Hannamari Heiniluoma <hannamari.h.heiniluoma@jyu.fi> --- Hi! My query was /patrons/?date_of_birth=2000-01-01. That returns status code 200 and an empty response []. If I change the date format, eg. /patrons/?date_of_birth=2000/01/01 (or any other format I can think of), I get 500 and { "error": "Something went wrong, check Koha logs for details." } -- 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=28585 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Bug in GET /patrons by |Cannot search on date |date_of_birth |fields Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | Severity|normal |major Version|21.05 |unspecified CC| |jonathan.druart+koha@gmail. | |com Status|NEW |ASSIGNED --- Comment #4 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- DBIC is receiving dateofbirth { like "%1980-04-24T00:00:00%" } -- 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=28585 --- Comment #5 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 122381 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122381&action=edit Bug 28585: Fix search on date field We should not rfc3339 format the date if it's not a datetime -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 --- Comment #6 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Tomas, looks like this could be a fix. Do you see something else? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Jonathan Druart from comment #6)
Tomas, looks like this could be a fix. Do you see something else?
I wrote regression tests and this doesn't work, because it fails for date-time parameters. I'll take care. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #122381|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=28585 --- Comment #8 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 122444 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122444&action=edit Bug 28585: Regression tests This patch adds tests for filtering GET calls with date/date-time parameters. Tests fail because the feature is not working Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 122445 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122445&action=edit Bug 28585: Use the datetime_parser for handling API dates This patchset takes the GET /patrons route as a sample usage for filtering on date and date-time (including timestamp) fields. It then makes Koha::Object->attributes_from_api use the DB storage datetime parser for format the parameters correctly. To test: 1. Apply the regression tests 2. Run: $ kshell k$ prove t/db_dependent/api/v1/patrons.t => FAIL: It doesn't find the patron when filtering by date 3. Apply this patch 4. Repeat 2 => SUCCESS: It works now! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 122446 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122446&action=edit Bug 28585: (follow-up) Tests for q= supporting date/date-time parameters Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 --- Comment #11 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I made the q= tests a follow-up, because I'm not sure bug 28480 will be backported to affected stable branches, and so ease backporting this important fix. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=28632 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 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=28585 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #122444|0 |1 is obsolete| | --- Comment #12 from David Nind <david@davidnind.com> --- Created attachment 122457 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122457&action=edit Bug 28585: Regression tests This patch adds tests for filtering GET calls with date/date-time parameters. Tests fail because the feature is not working Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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=28585 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #122445|0 |1 is obsolete| | --- Comment #13 from David Nind <david@davidnind.com> --- Created attachment 122458 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122458&action=edit Bug 28585: Use the datetime_parser for handling API dates This patchset takes the GET /patrons route as a sample usage for filtering on date and date-time (including timestamp) fields. It then makes Koha::Object->attributes_from_api use the DB storage datetime parser for format the parameters correctly. To test: 1. Apply the regression tests 2. Run: $ kshell k$ prove t/db_dependent/api/v1/patrons.t => FAIL: It doesn't find the patron when filtering by date 3. Apply this patch 4. Repeat 2 => SUCCESS: It works now! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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=28585 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #122446|0 |1 is obsolete| | --- Comment #14 from David Nind <david@davidnind.com> --- Created attachment 122459 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122459&action=edit Bug 28585: (follow-up) Tests for q= supporting date/date-time parameters Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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=28585 --- Comment #15 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I think this will need some of the handling from Bug 24850 to work properly across timezones. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Assignee|tomascohen@gmail.com |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=28585 Kyle M Hall <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=28585 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #122457|0 |1 is obsolete| | Attachment #122458|0 |1 is obsolete| | Attachment #122459|0 |1 is obsolete| | --- Comment #16 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 123115 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123115&action=edit Bug 28585: Regression tests This patch adds tests for filtering GET calls with date/date-time parameters. Tests fail because the feature is not working Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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=28585 --- Comment #17 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 123116 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123116&action=edit Bug 28585: Use the datetime_parser for handling API dates This patchset takes the GET /patrons route as a sample usage for filtering on date and date-time (including timestamp) fields. It then makes Koha::Object->attributes_from_api use the DB storage datetime parser for format the parameters correctly. To test: 1. Apply the regression tests 2. Run: $ kshell k$ prove t/db_dependent/api/v1/patrons.t => FAIL: It doesn't find the patron when filtering by date 3. Apply this patch 4. Repeat 2 => SUCCESS: It works now! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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=28585 --- Comment #18 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 123117 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123117&action=edit Bug 28585: (follow-up) Tests for q= supporting date/date-time parameters Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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=28585 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact| |kyle@bywatersolutions.com Assignee|kyle@bywatersolutions.com |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |release-notes-needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 --- Comment #19 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Please add something for the release notes as well as on the wiki page. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |21.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 --- Comment #20 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Pushed to master for 21.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed --- Comment #21 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- t/db_dependent/Koha/Object.t .. 9/21 # Failed test 'Given a string, a timestamp field is converted into a DateTime object' # at t/db_dependent/Koha/Object.t line 514. # got: '' # expected: 'DateTime' # Failed test 'Given a string, a datetime field is converted into a DateTime object' # at t/db_dependent/Koha/Object.t line 528. # got: '' # expected: 'DateTime' # Failed test 'Given a string, a date field is converted into a DateTime object' # at t/db_dependent/Koha/Object.t line 542. # got: '' # expected: 'DateTime' # Looks like you failed 3 tests of 12. # Failed test 'attributes_from_api() tests' # at t/db_dependent/Koha/Object.t line 576. Tests added by commit badbd7d85913749e33d9bdba397dc79836080719 Bug 23893: Catch dt_from_string exceptions Looks like we should remove the tests, do you have something else to suggest? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 --- Comment #22 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Can you also remind me why we are not using Koha::DateUtils instead of $dtf? Is that because of bug 24850? If so, shouldn't we add a comment about replacing the line when 24850 will be pushed? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |RM NOTES: Reverted release notes| | Status|Pushed to master |ASSIGNED Version(s)|21.11.00 | released in| | --- Comment #23 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Patches reverted. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=29157 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #123115|0 |1 is obsolete| | --- Comment #24 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 126668 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126668&action=edit Bug 28585: Regression tests This patch adds tests for filtering GET calls with date/date-time parameters. Tests fail because the feature is not working Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #123116|0 |1 is obsolete| | --- Comment #25 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 126669 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126669&action=edit Bug 28585: Use the datetime_parser for handling API dates This patchset takes the GET /patrons route as a sample usage for filtering on date and date-time (including timestamp) fields. It then makes Koha::Object->attributes_from_api use the DB storage datetime parser for format the parameters correctly. To test: 1. Apply the regression tests 2. Run: $ kshell k$ prove t/db_dependent/api/v1/patrons.t => FAIL: It doesn't find the patron when filtering by date 3. Apply this patch 4. Repeat 2 => SUCCESS: It works now! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #123117|0 |1 is obsolete| | --- Comment #26 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 126670 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126670&action=edit Bug 28585: (follow-up) Tests for q= supporting date/date-time parameters Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 --- Comment #27 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 126671 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126671&action=edit Bug 28585: (QA follow-up) Fix object.t Object.t was still testing for the return of DateTime objects from attributes_from_api. I checked all calls to attrbutes_from_api for reliance of DateTime objects and confirmed they all get passed into search calls and thus are better served as SQL formatted strings. I then converted the test to check that the rfc3339 formatted dates passed in were converted to strings appropriate for feeding into SQL where statements instead. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|tomascohen@gmail.com |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 --- Comment #28 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- (In reply to Jonathan Druart from comment #22)
Can you also remind me why we are not using Koha::DateUtils instead of $dtf? Is that because of bug 24850? If so, shouldn't we add a comment about replacing the line when 24850 will be pushed?
It's pretty standard practice to use the DateTime parser returned by DBI for the connected database to format DateTime objects for SQL... I'm not even sure what function does the same in DateUtils? Personally, I've used the dtf method all over the codebase.. it's what I reach for first when inputting a query. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 --- Comment #29 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- FTR, discussed on IRC. Seeing set_from_api calling attributes_from_api I hadn't notice we were doing something else than insert/update (and DBIC accepts DT object). Here the method deals with search as well and so needs to format. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 --- Comment #30 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Are we certain we have a test for the "set a date using the REST API" case? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 --- Comment #31 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- (In reply to Jonathan Druart from comment #30)
Are we certain we have a test for the "set a date using the REST API" case?
I can't find one.. I'll look at writing one (or begging Tomas to write one) tomorrow.. brain is dead for today already ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 --- Comment #32 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Any PUT test on patrons is testing that implicitly. But it wouldn't hurt to add some explicit tests. I'll take care in a bit. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 --- Comment #33 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 126679 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126679&action=edit Bug 28585: (QA follow-up) Add explicit tests for setting date/date-time attributes Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 --- Comment #34 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I noticed I wrote this comment too fast, and maybe someone reading this back would benefit from a more detailed explanation, sorry for that :-D (In reply to Tomás Cohen Arazi from comment #32)
Any PUT test on patrons is testing that implicitly.
^^ This tried to mean that: ``` my $json = $builder->build_object({ class => 'Koha::Patrons' })->to_api; ``` will have any date/date-time attribute filled with a random date/date-time (that's what TestBuilder does, and to_api converts to the correct format), which the POST and PUT tests already test when they do things like this: ``` is_deeply($got, $newpatron, 'Returned patron from update matches expected'); ``` Anyhow, we better have explicit tests for special things we want to highlight. Good catch, RM. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 --- Comment #35 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Ah, of course! Nice explanation Tomas, I totally missed that deeply compare.. Glad to had an explicit test though too, just ensure we catch if should we ever change testbuilder in some way that reduces that implicit coverage. Nice one -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |21.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 --- Comment #36 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Pushed to master for 21.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the|RM NOTES: Reverted | release notes| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This patch fixes the date release notes| |handling for query parsing | |from the API. We use | |dt_from_string to convert | |out RFC3339 formatted date | |strings to DateTime objects | |with an associated timezone | |and then user the native | |datetime formatted provided | |by the SQL connection | |library to convert to an | |appropriately formated date | |time string. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|release-notes-needed | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|21.11.00 |21.11.00,21.05.05 released in| | Status|Pushed to master |Pushed to stable --- Comment #37 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to 21.05.x for 21.05.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #38 from Fridolin Somers <fridolin.somers@biblibre.com> --- I tried to apply on 20.11.x but tests fail. Can you try to rebase please ? -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org