[Bug 36822] New: When creating a new patron via C4::Auth_with_ldap inserts 0000-00-00 for invalid updated_on
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36822 Bug ID: 36822 Summary: When creating a new patron via C4::Auth_with_ldap inserts 0000-00-00 for invalid updated_on Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Authentication Assignee: koha-bugs@lists.koha-community.org Reporter: betka@illinois.edu QA Contact: testopia@bugs.koha-community.org CC: dpavlin@rot13.org Relevant versions: OS: Ubuntu 22.04 Koha: 23.11.04-4 MySQL: 8.0.36-0ubuntu0.22.04.1 When using Auth_with_ldap, new borrowers that are created via LDAP have an updated_on date of 0000-00-00 00:00:00. Guessing this may be related to comments in https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18016 May also be a side effect of explicitly declaring a default_value of \"current_timestamp" for updated_on in Koha/Schema/Result/Borrower.pm. (Guessing no one else is still using LDAP to create accounts) -- 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=36822 betka@illinois.edu changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=18016 -- 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=36822 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |RM_priority -- 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=36822 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com, | |pedro.amorim@ptfs-europe.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36822 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |CONFIRMED -- 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=36822 --- Comment #1 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- I've been looking into this with Martin since we've been experiencing the same issue but with Shibboleth. We believe we've got a fix and currently working on it to submit soon. -- 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=36822 --- Comment #2 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- We've narrowed the same issue down in Shibboleth and likely have the fix for this case too... we need to refresh the new patron object after it's creation in auth_with_ldap before passing it back to auth.pm else the internal representation of the data isn't up to date with whats in the database and we try to reset those fields at update later. What I don't fully understand is why the internal \'current_timestamp' is somehow getting converted to 0000-00-00 for insert later from SCALAR dump.. but I'll leave someone wiser than me to dig there if they're keen to. -- 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=36822 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|When creating a new patron |When creating a new patron |via C4::Auth_with_ldap |via LDAP or Shibboleth |inserts 0000-00-00 for |0000-00-00 is inserted for |invalid updated_on |invalid updated_on -- 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=36822 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|CONFIRMED |Needs Signoff -- 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=36822 --- Comment #3 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 173373 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173373&action=edit Bug 36822: Shibboleth - Add tests prove t/db_dependent/Auth_with_shibboleth.t -- 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=36822 --- Comment #4 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 173374 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173374&action=edit Bug 36822: Shibboleth - Add discard_changes Test plan: 1) Apply only Shibboleth tests patch 2) Run that test file: $ prove t/db_dependent/Auth_with_shibboleth.t 3) Verify tests fail with the updated_on error message. 4) Apply this patch. Repeat 2) Verify tests now pass. Co-authored-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- 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=36822 --- Comment #5 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 173375 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173375&action=edit Bug 36822: LDAP - Rearrange Auth_with_ldap.pm so it picks up on mock config from test file Without this rearrangement, C4::Context->config('useldapserver') is always 0. It seems that because its inside a BEGIN block, the mock coming from .t file does not get picked up -- 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=36822 --- Comment #6 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 173376 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173376&action=edit Bug 36822: LDAP - Add test Co-authored-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- 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=36822 --- Comment #7 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 173377 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173377&action=edit Bug 36822: LDAP - Add discard_changes Test plan: 1) Apply only LDAP rearrangement patch 2) Run that test file (to prove the rearrangement does not break tests): $ prove t/db_dependent/Auth_with_ldap.t 3) Verify tests pass 4) Apply LDAP test patch on top 5) Run the test file. Notice it fails. 6) Apply this patch. Run LDAP tests again. Verify tests pass. -- 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=36822 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173373|0 |1 is obsolete| | --- Comment #8 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 173385 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173385&action=edit Bug 36822: Shibboleth - Add tests prove t/db_dependent/Auth_with_shibboleth.t -- 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=36822 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173374|0 |1 is obsolete| | --- Comment #9 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 173386 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173386&action=edit Bug 36822: Shibboleth - Add discard_changes Test plan: 1) Apply only Shibboleth tests patch 2) Run that test file: $ prove t/db_dependent/Auth_with_shibboleth.t 3) Verify tests fail with the updated_on error message. 4) Apply this patch. Repeat 2) Verify tests now pass. Co-authored-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- 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=36822 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173375|0 |1 is obsolete| | --- Comment #10 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 173387 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173387&action=edit Bug 36822: LDAP - Rearrange Auth_with_ldap.pm so it picks up on mock config from test file Without this rearrangement, C4::Context->config('useldapserver') is always 0. It seems that because its inside a BEGIN block, the mock coming from .t file does not get picked up -- 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=36822 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173376|0 |1 is obsolete| | --- Comment #11 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 173388 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173388&action=edit Bug 36822: LDAP - Add test -- 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=36822 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173377|0 |1 is obsolete| | --- Comment #12 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 173389 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173389&action=edit Bug 36822: LDAP - Add discard_changes Test plan: 1) Apply only LDAP rearrangement patch 2) Run that test file (to prove the rearrangement does not break tests): $ prove t/db_dependent/Auth_with_ldap.t 3) Verify tests pass 4) Apply LDAP test patch on top 5) Run the test file. Notice it fails. 6) Apply this patch. Run LDAP tests again. Verify tests pass. Co-authored-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- 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=36822 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173385|0 |1 is obsolete| | --- Comment #13 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 173391 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173391&action=edit Bug 36822: Shibboleth - Add tests prove t/db_dependent/Auth_with_shibboleth.t -- 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=36822 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173386|0 |1 is obsolete| | --- Comment #14 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 173392 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173392&action=edit Bug 36822: Shibboleth - Add discard_changes Test plan: 1) Apply only Shibboleth tests patch 2) Run that test file: $ prove t/db_dependent/Auth_with_shibboleth.t 3) Verify tests fail with the updated_on error message. 4) Apply this patch. Repeat 2) Verify tests now pass. Co-authored-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- 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=36822 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173387|0 |1 is obsolete| | --- Comment #15 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 173393 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173393&action=edit Bug 36822: LDAP - Rearrange Auth_with_ldap.pm so it picks up on mock config from test file Without this rearrangement, C4::Context->config('useldapserver') is always 0. It seems that because its inside a BEGIN block, the mock coming from .t file does not get picked up -- 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=36822 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173388|0 |1 is obsolete| | --- Comment #16 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 173394 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173394&action=edit Bug 36822: LDAP - Add test -- 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=36822 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173389|0 |1 is obsolete| | --- Comment #17 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 173395 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173395&action=edit Bug 36822: LDAP - Add discard_changes Test plan: 1) Apply only LDAP rearrangement patch 2) Run that test file (to prove the rearrangement does not break tests): $ prove t/db_dependent/Auth_with_ldap.t 3) Verify tests pass 4) Apply LDAP test patch on top 5) Run the test file. Notice it fails. 6) Apply this patch. Run LDAP tests again. Verify tests pass. Co-authored-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- 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=36822 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@gmail.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=36822 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |pedro.amorim@ptfs-europe.co |ity.org |m -- 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=36822 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=36822 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173391|0 |1 is obsolete| | --- Comment #18 from David Nind <david@davidnind.com> --- Created attachment 173402 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173402&action=edit Bug 36822: Shibboleth - Add tests prove t/db_dependent/Auth_with_shibboleth.t 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=36822 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173392|0 |1 is obsolete| | --- Comment #19 from David Nind <david@davidnind.com> --- Created attachment 173403 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173403&action=edit Bug 36822: Shibboleth - Add discard_changes Test plan: 1) Apply only Shibboleth tests patch 2) Run that test file: $ prove t/db_dependent/Auth_with_shibboleth.t 3) Verify tests fail with the updated_on error message. 4) Apply this patch. Repeat 2) Verify tests now pass. Co-authored-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> 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=36822 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173393|0 |1 is obsolete| | --- Comment #20 from David Nind <david@davidnind.com> --- Created attachment 173404 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173404&action=edit Bug 36822: LDAP - Rearrange Auth_with_ldap.pm so it picks up on mock config from test file Without this rearrangement, C4::Context->config('useldapserver') is always 0. It seems that because its inside a BEGIN block, the mock coming from .t file does not get picked up 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=36822 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173394|0 |1 is obsolete| | --- Comment #21 from David Nind <david@davidnind.com> --- Created attachment 173405 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173405&action=edit Bug 36822: LDAP - Add test 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=36822 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173395|0 |1 is obsolete| | --- Comment #22 from David Nind <david@davidnind.com> --- Created attachment 173406 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173406&action=edit Bug 36822: LDAP - Add discard_changes Test plan: 1) Apply only LDAP rearrangement patch 2) Run that test file (to prove the rearrangement does not break tests): $ prove t/db_dependent/Auth_with_ldap.t 3) Verify tests pass 4) Apply LDAP test patch on top 5) Run the test file. Notice it fails. 6) Apply this patch. Run LDAP tests again. Verify tests pass. Co-authored-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> 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=36822 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_24_11_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36822 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |major -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36822 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=31143 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36822 --- Comment #23 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 173646 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173646&action=edit Bug 36822: atomicupdate Fix any existing updated_on issues -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36822 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA QA Contact|testopia@bugs.koha-communit |aleisha@catalyst.net.nz |y.org | CC| |aleisha@catalyst.net.nz --- Comment #24 from Aleisha Amohia <aleisha@catalyst.net.nz> --- Really keen to pass QA on this but a few QA tool warnings to address first please: WARN C4/Auth.pm WARN tidiness The file is less tidy than before (bad/messy lines before: 387, now: 388) OK C4/Auth_with_ldap.pm OK C4/Auth_with_shibboleth.pm OK installer/data/mysql/atomicupdate/bug_36822.pl WARN t/db_dependent/Auth_with_ldap.t WARN tidiness The file is less tidy than before (bad/messy lines before: 104, now: 105) WARN t/db_dependent/Auth_with_shibboleth.t WARN tidiness The file is less tidy than before (bad/messy lines before: 109, now: 116) Processing additional checks OK! * Was this bug sponsored by anyone? Running tests (2) * Proving /kohadevbox/koha/t/db_dependent/Auth_with_shibboleth.t OK! * Proving /kohadevbox/koha/t/db_dependent/Auth_with_ldap.t OK! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36822 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36822 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173402|0 |1 is obsolete| | --- Comment #25 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 173903 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173903&action=edit Bug 36822: Shibboleth - Add tests prove t/db_dependent/Auth_with_shibboleth.t 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=36822 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173403|0 |1 is obsolete| | --- Comment #26 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 173904 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173904&action=edit Bug 36822: Shibboleth - Add discard_changes Test plan: 1) Apply only Shibboleth tests patch 2) Run that test file: $ prove t/db_dependent/Auth_with_shibboleth.t 3) Verify tests fail with the updated_on error message. 4) Apply this patch. Repeat 2) Verify tests now pass. Co-authored-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> 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=36822 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173404|0 |1 is obsolete| | --- Comment #27 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 173905 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173905&action=edit Bug 36822: LDAP - Rearrange Auth_with_ldap.pm so it picks up on mock config from test file Without this rearrangement, C4::Context->config('useldapserver') is always 0. It seems that because its inside a BEGIN block, the mock coming from .t file does not get picked up 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=36822 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173405|0 |1 is obsolete| | --- Comment #28 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 173906 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173906&action=edit Bug 36822: LDAP - Add test 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=36822 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173406|0 |1 is obsolete| | --- Comment #29 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 173907 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173907&action=edit Bug 36822: LDAP - Add discard_changes Test plan: 1) Apply only LDAP rearrangement patch 2) Run that test file (to prove the rearrangement does not break tests): $ prove t/db_dependent/Auth_with_ldap.t 3) Verify tests pass 4) Apply LDAP test patch on top 5) Run the test file. Notice it fails. 6) Apply this patch. Run LDAP tests again. Verify tests pass. Co-authored-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> 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=36822 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173646|0 |1 is obsolete| | --- Comment #30 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 173908 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173908&action=edit Bug 36822: atomicupdate Fix any existing updated_on issues -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36822 --- Comment #31 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 173909 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173909&action=edit Bug 36822: (QA follow-up): Fix now time in tests This is to prevent the scenario of tests failing if they take long to run, e.g.: # Failed test 'updated_on correctly saved on newly created user' # at t/db_dependent/Auth_with_shibboleth.t line 317. # Structures begin differing at: # ->[0] = '2024-11-04 11:20:13' # ->[0] = '2024-11-04 11:20:14 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36822 --- Comment #32 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- (In reply to Aleisha Amohia from comment #24)
Really keen to pass QA on this but a few QA tool warnings to address first please:
Thank you Aleisha, I've squashed perltidy tidyness to the tests files patches to address the warnings of Auth_with_ldap.t and Auth_with_shibboleth.t I've also submitted a follow-up to prevent tests from failing if enough time has gone by between user being created and the test running (stumbled upon this while revisiting). I've spent an unreasonable amount of time trying fix the tidy warning of 1 untidy line in C4/Auth.pm and I can't fix it barring tidying the whole file. I'm happy to have someone else fix this tidy warning for me on C4/Auth.pm but I also don't think this should be reason enough to block these patches. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36822 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #33 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Let's not hold this one up just for the Tidy challenges.. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36822 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_24_11_candidate, | |RM_priority | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36822 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |24.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=36822 --- Comment #34 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.11! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36822 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_23_05_candidate, | |rel_23_11_candidate, | |rel_24_05_candidate --- Comment #35 from Aleisha Amohia <aleisha@catalyst.net.nz> --- This affects our libraries as early as 23.05 so have added the relevant keywords -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36822 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed --- Comment #36 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- This causes an issue with MySQL 8 that doesn't even allow comparisons to an invalid date: 11:19:21 koha_1 | Upgrade to 24.06.00.056 [10:19:04]: Bug 36822 (https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36822) - Sanitize borrowers.updated_on 11:19:21 koha_1 | ERROR - {UNKNOWN}: DBI Exception: DBD::mysql::st execute failed: Incorrect TIMESTAMP value: '0000-00-00 00:00:00' at /kohadevbox/koha/C4/Installer.pm line 742 We have discussed several solutions. I guess we can assume a database that strict doesn't have invalid dates, so a try-catch was what we thought would work best. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36822 --- Comment #37 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 174523 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174523&action=edit Bug 36822: (follow-up) Catch MySQL 8 failure in update We add a try/catch around the call to fix 0000-00-00 dates in the database. MySQL 8.0 throws an error on the WHERE clause for such a search. 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=36822 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #174523|0 |1 is obsolete| | --- Comment #38 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 174525 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174525&action=edit Bug 36822: (follow-up) Catch MySQL 8 failure in update We add a CAST to the fetch of 0000-00-00 dates in the database. This prevents an error in MySQL 8.0 throws htat aborts the update. 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=36822 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Passed QA 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=36822 --- Comment #39 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Follow-up "Catch MySQL 8 failur in update" picked for main. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36822 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=36822 --- Comment #40 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.11! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36822 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Version(s)|24.11.00 |24.11.00,24.05.06 released in| | Status|Pushed to main |Pushed to stable Keywords|rel_24_05_candidate | --- Comment #41 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Backported to 24.05.x for upcoming 24.05.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36822 --- Comment #42 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 174926 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174926&action=edit Bug 36822: Improve datetime comparison in tests This removes the seconds part of the datetime comparison because when running tests this may mismatch causing tests to become flaky. The previous patch 'Fix now time in tests' was not enough to prevent this. prove t/db_dependent/Auth_with_ldap.t prove t/db_dependent/Auth_with_shibboleth.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36822 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #174926|0 |1 is obsolete| | --- Comment #43 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 174927 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174927&action=edit Bug 36822: Improve datetime comparison in tests This removes the seconds part of the datetime comparison because when running tests this may mismatch causing tests to become flaky. The previous patch 'Fix now time in tests' was not enough to prevent this. prove t/db_dependent/Auth_with_ldap.t prove t/db_dependent/Auth_with_shibboleth.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36822 --- Comment #44 from Jonathan Druart <jonathan.druart@gmail.com> --- Pedro, you need to use t::lib::Dates::compare -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36822 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #174927|0 |1 is obsolete| | --- Comment #45 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 174965 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174965&action=edit Bug 36822: Improve datetime comparison in tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36822 --- Comment #46 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Jonathan Druart from comment #45)
Created attachment 174965 [details] [review] Bug 36822: Improve datetime comparison in tests
Moved to bug 38526 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36822 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |38526 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38526 [Bug 38526] Auth_with_* tests fail randomly -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36822 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Version(s)|24.11.00,24.05.06 |24.11.00,24.05.06,23.11.11 released in| | Status|Pushed to stable |Pushed to oldstable --- Comment #47 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.11.x for 23.11.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36822 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |RESOLVED Resolution|--- |FIXED CC| |wainuiwitikapark@catalyst.n | |et.nz --- Comment #48 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11 unless requested -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org