When you duplicate a budget from an existing one, the timestamp is copied from the existing budget rather than set to the time of creation.
Created attachment 59886 [details] [review] Bug 15408 : deleted the timestamp so that the database gives a new one To duplicate the budget, the function CloneBudgetHierarchy create a new budget from the old without the parameter timestamp, so that the database generates a new one.
Created attachment 59887 [details] [review] Bug 15408 : deleted the timestamp so that the database gives a new one To duplicate the budget, the function CloneBudgetHierarchy create a new budget from the old without the parameter timestamp, so that the database generates a new one.
Created attachment 59890 [details] [review] Bug 15408 : deleted the timestamp so that the database gives a new one To duplicate the budget, the function CloneBudgetHierarchy create a new budget from the old without the parameter timestamp, so that the database generates a new one. Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Created attachment 59974 [details] [review] Added unit tests to patch
Hi Baptiste, You must run the QA scripts on your patches before submitting them: https://wiki.koha-community.org/wiki/QA_Test_Tools Regarding first patch: - Indentation is 4 spaces, not tabs. Second patch: - It contains debug statements (warn) - is (and other Test::More subroutines) must be called with the description of the test.
Created attachment 60244 [details] [review] Modified to run properly the QA tests
Created attachment 60337 [details] [review] Bug 15408 : deleted the timestamp so that the database gives a new one To duplicate the budget, the function CloneBudgetHierarchy create a new budget from the old without the parameter timestamp, so that the database generates a new one.
Created attachment 60338 [details] [review] Added unit tests to patch
Created attachment 60339 [details] [review] Modified to run properly the QA tests
All tests pass but a new timestamp is still not being generated. Setting to Failed QA.
Hi, Working on mine, did you follow a testplan like this one ? And I'm surprized about all tests being fine, because the test about budget is supposed to be false : checkout all file except test 1 - go on mysql "select * from aqbudgets \G" 2 - duplicate a budget 3 - "select * from aqbudgets \G" => new budgets should have the same timestamp as the others 4 - apply patch 5 - "select * from aqbudgets \G" => new budget have new timestamp Errors I think you can have done testing my patch: - look at aqbudgetperiods - look at the date of creation or enddate and not timestamp
Created attachment 62985 [details] [review] [SIGNED OFF] Bug 15408 : deleted the timestamp so that the database gives a new one To duplicate the budget, the function CloneBudgetHierarchy create a new budget from the old without the parameter timestamp, so that the database generates a new one. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 62986 [details] [review] [SIGNED OFF] Added unit tests to patch https://bugs.koha-community.org/show_bug.cgi?id=15408 Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 62987 [details] [review] [SIGNED OFF] Modified to run properly the QA tests https://bugs.koha-community.org/show_bug.cgi?id=15408 Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 65181 [details] [review] Bug 15408 : deleted the timestamp so that the database gives a new one To duplicate the budget, the function CloneBudgetHierarchy create a new budget from the old without the parameter timestamp, so that the database generates a new one. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 65182 [details] [review] Added unit tests to patch https://bugs.koha-community.org/show_bug.cgi?id=15408 Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 65183 [details] [review] Modified to run properly the QA tests https://bugs.koha-community.org/show_bug.cgi?id=15408 Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Tests pass without the delete statement.
Baptiste doesn't work anymore at BibLibre. Unassigning to avoid signaling that this bug is still being supervized. Which could wrongly discourage someone to continue the work.
Created attachment 77524 [details] [review] Bug 15408 : deleted the timestamp so that the database gives a new one To duplicate the budget, the function CloneBudgetHierarchy create a new budget from the old without the parameter timestamp, so that the database generates a new one. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 77525 [details] [review] Added unit tests to patch https://bugs.koha-community.org/show_bug.cgi?id=15408 Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 77526 [details] [review] Modified to run properly the QA tests https://bugs.koha-community.org/show_bug.cgi?id=15408 Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 77527 [details] [review] Bug 15408: Fix tests to fail without patch We set all the timestamps to a specified date and ensure the new budgets don't have this date
Created attachment 77539 [details] [review] Bug 15408: Remove timestamp when cloning a fund To duplicate the budget, the function CloneBudgetHierarchy create a new budget from the old without the parameter timestamp, so that the database generates a new one. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Added unit tests to patch Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Modified to run properly the QA tests Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 77540 [details] [review] Bug 15408: Fix tests to fail without patch We set all the timestamps to a specified date and ensure the new budgets don't have this date Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 77541 [details] [review] Bug 15408: Remove fund's timestamp when cloning a budget To duplicate the budget, the function CloneBudgetHierarchy create a new budget from the old without the parameter timestamp, so that the database generates a new one. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Added unit tests to patch Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Modified to run properly the QA tests Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 77542 [details] [review] Bug 15408: Fix tests to fail without patch We set all the timestamps to a specified date and ensure the new budgets don't have this date Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
I have squashed the first patches to clean the history (warn, indentation and commit messages).
Awesome work all! Pushed to master for 18.11
Pushed to 18.05.x for 18.05.03
Depends on Bug 19826 not in 17.11.x