Bug 11861 added ISSN column in serials claims table, in a SQL query in C4::Serials::GetLateOrMissingIssues(). But this SQL query is in a if condition, the same change must be done in the else case.
Created attachment 57832 [details] [review] Bug 17703 - Add ISSN column in serials claims table - fix Bug 11861 added ISSN column in serials claims table, in a SQL query in C4::Serials::GetLateOrMissingIssues(). But this SQL query is in a if condition, the same change must be done in the else case. Test plan: 1/ Go to serials claims page 2/ Do not choose a vendor and submit 3/ You should see a ISSN column, filled with subscription ISSN
Hi Fridolin, can you check your test plan? I have tested, but didn't manage to not have the ISSN column filled on claim serials page. In your test plan you say: 2/ Do not choose a vendor and submit But this is not possible int he GUI - there is no empyt entry in the pull down and an entry there only appears for a vendor with late serial issues.
Created attachment 65454 [details] [review] Bug 17703 - Add ISSN column in serials claims table - fix Bug 11861 added ISSN column in serials claims table, in a SQL query in C4::Serials::GetLateOrMissingIssues(). But this SQL query is in a if condition, the same change must be done in the else case. Test plan: - Make sure you have a subscription with some late issues - Go to serials claims page /cgi-bin/koha/serials/claims.pl - Choose a vendor and click OK => You should see a ISSN column, filled with subscription ISSN
Ahhhhh oups no this change is needed for CSV export. I rewrite test plan
(In reply to Fridolin SOMERS from comment #4) > Ahhhhh oups no this change is needed for CSV export. > I rewrite test plan I even rewrite method to use common SQL query with only condition on WHERE.
Created attachment 65455 [details] [review] Bug 17703 - Add ISSN column in serials claims table - fix Bug 11861 added ISSN column in serials claims table and a SQL query in C4::Serials::GetLateOrMissingIssues(). But this SQL query is in a if $supplierid condition, the same change must be done if $serialid to allow ISSN in CVS export of claims. This patch rewrites the method to have a common SQL query with conditions only on WHERE. Removes the order input arg since it is never used, order in TT is managed by DataTable and CSV export is generated with the order of selected rows. Test plan: - Make sure you have a subscription with some late or missing issues - Go to Tool > CSV profils - Create a profile : Profile name = Issues to claim Profile type = SQL Usage = Late serial issues claims Profile SQL fields = SUPPLIER=aqbooksellers.name|TITLE=subscription.title|ISSN=subscription.issn|ISSUE NUMBER=serial.serialseq|LATE SINCE=serial.planneddate - Go to serials claims page : /cgi-bin/koha/serials/claims.pl - Choose a vendor and click OK - You see serials to claim, with ISSN column filled with subscription's ISSN - Check all lines - Select "Issues to claim" CSV profile - Click on "Download selected claims" => With patch you have ISSN value - Run UT t/db_dependent/Serials/Claims.t
Created attachment 66150 [details] [review] [SIGNED OFF] Bug 17703 - Add ISSN column in serials claims table - fix Bug 11861 added ISSN column in serials claims table and a SQL query in C4::Serials::GetLateOrMissingIssues(). But this SQL query is in a if $supplierid condition, the same change must be done if $serialid to allow ISSN in CVS export of claims. This patch rewrites the method to have a common SQL query with conditions only on WHERE. Removes the order input arg since it is never used, order in TT is managed by DataTable and CSV export is generated with the order of selected rows. Test plan: - Make sure you have a subscription with some late or missing issues - Go to Tool > CSV profils - Create a profile : Profile name = Issues to claim Profile type = SQL Usage = Late serial issues claims Profile SQL fields = SUPPLIER=aqbooksellers.name|TITLE=subscription.title|ISSN=subscription.issn|ISSUE NUMBER=serial.serialseq|LATE SINCE=serial.planneddate - Go to serials claims page : /cgi-bin/koha/serials/claims.pl - Choose a vendor and click OK - You see serials to claim, with ISSN column filled with subscription's ISSN - Check all lines - Select "Issues to claim" CSV profile - Click on "Download selected claims" => With patch you have ISSN value - Run UT t/db_dependent/Serials/Claims.t Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
please provide a test.
Created attachment 101994 [details] [review] Bug 17703: Always add ISSN in serials claims issues Bug 11861 added ISSN column in serials claims table and a SQL query in C4::Serials::GetLateOrMissingIssues(). But this SQL query is in a if $supplierid condition, the same change must be done if $serialid to allow ISSN in CVS export of claims. This patch rewrites the method to have a common SQL query with conditions only on WHERE. Removes the order input arg since it is never used, order in TT is managed by DataTable and CSV export is generated with the order of selected rows. Test plan: - Make sure you have a subscription with some late or missing issues - Go to Tool > CSV profils - Create a profile : Profile name = Issues to claim Profile type = SQL Usage = Late serial issues claims Profile SQL fields = SUPPLIER=aqbooksellers.name|TITLE=subscription.title|ISSN=subscription.issn|ISSUE NUMBER=serial.serialseq|LATE SINCE=serial.planneddate - Go to serials claims page : /cgi-bin/koha/serials/claims.pl - Choose a vendor and click OK - You see serials to claim, with ISSN column filled with subscription's ISSN - Check all lines - Select "Issues to claim" CSV profile - Click on "Download selected claims" => With patch you have ISSN value Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 101996 [details] [review] Bug 17703: add unit test Run : prove t/db_dependent/Serials/Claims.t
Created attachment 101997 [details] [review] Bug 17703: Always add ISSN in serials claims issues Bug 11861 added ISSN column in serials claims table and a SQL query in C4::Serials::GetLateOrMissingIssues(). But this SQL query is in a if $supplierid condition, the same change must be done if $serialid to allow ISSN in CVS export of claims. This patch rewrites the method to have a common SQL query with conditions only on WHERE. Removes the order input arg since it is never used, order in TT is managed by DataTable and CSV export is generated with the order of selected rows. Test plan: - Make sure you have a subscription with some late or missing issues - Go to Tool > CSV profils - Create a profile : Profile name = Issues to claim Profile type = SQL Usage = Late serial issues claims Profile SQL fields = SUPPLIER=aqbooksellers.name|TITLE=subscription.title|ISSN=subscription.issn|ISSUE NUMBER=serial.serialseq|LATE SINCE=serial.planneddate - Go to serials claims page : /cgi-bin/koha/serials/claims.pl - Choose a vendor and click OK - You see serials to claim, with ISSN column filled with subscription's ISSN - Check all lines - Select "Issues to claim" CSV profile - Click on "Download selected claims" => With patch you have ISSN value Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 102000 [details] [review] Bug 17703: Add unit tests Run : prove t/db_dependent/Serials/Claims.t
Created attachment 102001 [details] [review] Bug 17703: Always add ISSN in serials claims issues Bug 11861 added ISSN column in serials claims table and a SQL query in C4::Serials::GetLateOrMissingIssues(). But this SQL query is in a if $supplierid condition, the same change must be done if $serialid to allow ISSN in CVS export of claims. This patch rewrites the method to have a common SQL query with conditions only on WHERE. Removes the order input arg since it is never used, order in TT is managed by DataTable and CSV export is generated with the order of selected rows. Test plan: - Make sure you have a subscription with some late or missing issues - Go to Tool > CSV profils - Create a profile : Profile name = Issues to claim Profile type = SQL Usage = Late serial issues claims Profile SQL fields = SUPPLIER=aqbooksellers.name|TITLE=subscription.title|ISSN=subscription.issn|ISSUE NUMBER=serial.serialseq|LATE SINCE=serial.planneddate - Go to serials claims page : /cgi-bin/koha/serials/claims.pl - Choose a vendor and click OK - You see serials to claim, with ISSN column filled with subscription's ISSN - Check all lines - Select "Issues to claim" CSV profile - Click on "Download selected claims" => With patch you have ISSN value Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(In reply to Jonathan Druart from comment #8) > please provide a test. Here it is.
Created attachment 102197 [details] [review] Bug 17703: Add unit tests Run : prove t/db_dependent/Serials/Claims.t Signed-off-by: David Nind <david@davidnind.com>
Created attachment 102199 [details] [review] Bug 17703: Always add ISSN in serials claims issues Bug 11861 added ISSN column in serials claims table and a SQL query in C4::Serials::GetLateOrMissingIssues(). But this SQL query is in a if $supplierid condition, the same change must be done if $serialid to allow ISSN in CVS export of claims. This patch rewrites the method to have a common SQL query with conditions only on WHERE. Removes the order input arg since it is never used, order in TT is managed by DataTable and CSV export is generated with the order of selected rows. Test plan: - Make sure you have a subscription with some late or missing issues - Go to Tool > CSV profils - Create a profile : Profile name = Issues to claim Profile type = SQL Usage = Late serial issues claims Profile SQL fields = SUPPLIER=aqbooksellers.name|TITLE=subscription.title|ISSN=subscription.issn|ISSUE NUMBER=serial.serialseq|LATE SINCE=serial.planneddate - Go to serials claims page : /cgi-bin/koha/serials/claims.pl - Choose a vendor and click OK - You see serials to claim, with ISSN column filled with subscription's ISSN - Check all lines - Select "Issues to claim" CSV profile - Click on "Download selected claims" => With patch you have ISSN value Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: David Nind <david@davidnind.com>
Tests are failing for me. t/db_dependent/Serials/Claims.t .. 2/20 # Failed test 'subscription 1 should have 1 issue in late' # at t/db_dependent/Serials/Claims.t line 172. # got: '0' # expected: '1' # Failed test 'return of GetLateOrMissingIssues() contains biblioitems.issn' # at t/db_dependent/Serials/Claims.t line 173. # got: undef # expected: '123456789' # Looks like you failed 2 tests of 20.
Created attachment 119444 [details] [review] Bug 17703: Add unit tests Run : prove t/db_dependent/Serials/Claims.t Signed-off-by: David Nind <david@davidnind.com>
Created attachment 119445 [details] [review] Bug 17703: Add unit tests Run : prove t/db_dependent/Serials/Claims.t Signed-off-by: David Nind <david@davidnind.com>
Created attachment 119446 [details] [review] Bug 17703: Always add ISSN in serials claims issues Bug 11861 added ISSN column in serials claims table and a SQL query in C4::Serials::GetLateOrMissingIssues(). But this SQL query is in a if $supplierid condition, the same change must be done if $serialid to allow ISSN in CVS export of claims. This patch rewrites the method to have a common SQL query with conditions only on WHERE. Removes the order input arg since it is never used, order in TT is managed by DataTable and CSV export is generated with the order of selected rows. Test plan: - Make sure you have a subscription with some late or missing issues - Go to Tool > CSV profils - Create a profile : Profile name = Issues to claim Profile type = SQL Usage = Late serial issues claims Profile SQL fields = SUPPLIER=aqbooksellers.name|TITLE=subscription.title|ISSN=subscription.issn|ISSUE NUMBER=serial.serialseq|LATE SINCE=serial.planneddate - Go to serials claims page : /cgi-bin/koha/serials/claims.pl - Choose a vendor and click OK - You see serials to claim, with ISSN column filled with subscription's ISSN - Check all lines - Select "Issues to claim" CSV profile - Click on "Download selected claims" => With patch you have ISSN value Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: David Nind <david@davidnind.com>
I've removed from unit test : +use C4::Serials; This is already managed by : use_ok('C4::Serials');
(In reply to Jonathan Druart from comment #17) > Tests are failing for me. > > t/db_dependent/Serials/Claims.t .. 2/20 > # Failed test 'subscription 1 should have 1 issue in late' > # at t/db_dependent/Serials/Claims.t line 172. > # got: '0' > # expected: '1' > > # Failed test 'return of GetLateOrMissingIssues() contains > biblioitems.issn' > # at t/db_dependent/Serials/Claims.t line 173. > # got: undef > # expected: '123456789' > # Looks like you failed 2 tests of 20. Works for me, can you retest please ?
Still failing, same errors.
> Failed test 'subscription 1 should have 1 issue in late' Stange, my patch does not impact this test o_O
Hum, retested today and the tests pass on a fresh install.
root@kohadevbox:koha(bug17703-qa)$ prove t/db_dependent/Serials/Claims.t t/db_dependent/Serials/Claims.t .. 16/20 # Failed test 'subscription 1 should have 1 issue in late' # at t/db_dependent/Serials/Claims.t line 171. # got: '0' # expected: '1' # Failed test 'return of GetLateOrMissingIssues() contains biblioitems.issn' # at t/db_dependent/Serials/Claims.t line 172. # got: undef # expected: '123456789' # Looks like you failed 2 tests of 20.