Bug 7498 - Cloning a budget: enable change of description
Summary: Cloning a budget: enable change of description
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Charles Farmer
QA Contact: Jonathan Druart
URL:
Keywords:
: 7580 9155 (view as bug list)
Depends on: 6943
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-03 16:58 UTC by Paul Poulain
Modified: 2015-06-04 23:33 UTC (History)
12 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Add new features and tests to the budget duplication (11.38 KB, patch)
2013-05-01 15:41 UTC, Frédérick Capovilla
Details | Diff | Splinter Review
Add new features and tests to the budget duplication : (11.56 KB, patch)
2013-05-23 09:51 UTC, Paul Poulain
Details | Diff | Splinter Review
Add new features and tests to the budget duplication : (11.70 KB, patch)
2013-06-10 09:36 UTC, Jonathan Druart
Details | Diff | Splinter Review
Add new features and tests to the budget duplication : (11.61 KB, patch)
2013-06-10 09:37 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 7498 - Cloning a budget, enable change of description (10.78 KB, patch)
2014-07-10 15:46 UTC, Charles Farmer
Details | Diff | Splinter Review
This file builds on the work done for Bug 12164 (6.00 KB, patch)
2014-08-06 21:12 UTC, Charles Farmer
Details | Diff | Splinter Review
30562: This file builds on the work done for Bug 12164 (6.21 KB, patch)
2014-08-14 11:39 UTC, Paola Rossi
Details | Diff | Splinter Review
[PASSED QA] Bug 7498 - Cloning a budget, enable change of description (6.04 KB, patch)
2014-08-15 10:34 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Poulain 2012-02-03 16:58:14 UTC
When duplicating a budget, a form let you enter the dates of the new cloned budget.
A small but usefull enhancement would be to let the user modify the budget description. It can be filled by default with the cloning budget description.
Comment 1 Nicole C. Engard 2012-02-26 19:46:32 UTC
*** Bug 7580 has been marked as a duplicate of this bug. ***
Comment 2 Owen Leonard 2012-11-27 20:13:23 UTC
*** Bug 9155 has been marked as a duplicate of this bug. ***
Comment 3 Frédérick Capovilla 2013-05-01 15:41:19 UTC Comment hidden (obsolete)
Comment 4 Frédérick Capovilla 2013-05-01 15:48:41 UTC
Patch sponsored by the CCSR ( http://www.ccsr.qc.ca )
Comment 5 Katrin Fischer 2013-05-11 12:39:12 UTC
Looks good on first glance and includes unit tests - contains a few strings so bumping to 3.14.
Comment 6 Paul Poulain 2013-05-23 09:51:16 UTC
Patch tested with a sandbox, by Cédric Vita <cedric.vita@dracenie.com>
Comment 7 Paul Poulain 2013-05-23 09:51:33 UTC Comment hidden (obsolete)
Comment 8 Jonathan Druart 2013-05-29 13:56:03 UTC
QA comment:

All look good.
I have just a little remark: after click on 'duplicate', the description field is prefilled with the original description's budget. But if the user does not change it, nothing append (no error and no creation). It would be good if a message appears (JS on submitting or after reloading the page ).

Marked as Failed QA.
Comment 9 Maxime Pelletier 2013-06-07 21:57:33 UTC
(In reply to comment #8)
> QA comment:
> 
> All look good.
> I have just a little remark: after click on 'duplicate', the description
> field is prefilled with the original description's budget. But if the user
> does not change it, nothing append (no error and no creation). It would be
> good if a message appears (JS on submitting or after reloading the page ).
> 
> Marked as Failed QA.

I don't understand this comment. Leaving the description to the original name works fine for me and it's a wanted feature. Could you explain more or test again ?
Comment 10 Jonathan Druart 2013-06-10 09:36:07 UTC
Oops sorry Maxime, I had a unique key on my aqbudgetperiod.description field, but it does not exist on the current master!

So all works as described. Unit tests are presents and a big bloc of code is moved in a pm file.
Just 3 tabulation characters in the .t file, my signoff patch will fix that.

Marked as Passed QA.
Comment 11 Jonathan Druart 2013-06-10 09:36:26 UTC Comment hidden (obsolete)
Comment 12 Jonathan Druart 2013-06-10 09:37:07 UTC Comment hidden (obsolete)
Comment 13 Galen Charlton 2013-06-10 14:51:28 UTC
Test cases do not pass:

$ prove -v t/db_dependent/Budgets.t
...
not ok 24 - 2 budgets for that budget period : the original and his child

#   Failed test '2 budgets for that budget period : the original and his child'
#   at t/db_dependent/Budgets.t line 119.
#          got: '1'
#     expected: '2'
ok 25
ok 26
ok 27
not ok 28

#   Failed test at t/db_dependent/Budgets.t line 123.
#          got: 'P�riodiques'
#     expected: 'Serials'
ok 29 - DelBudget returned 1
# Looks like you failed 2 tests of 29.
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/29 subtests
Comment 14 Charles Farmer 2014-07-10 15:46:29 UTC Comment hidden (obsolete)
Comment 15 Katrin Fischer 2014-07-11 06:45:35 UTC
Hi Charles, from the description of this, it seems to be a partial duplicate to bug 12164. 12164 adds options to move unreceived funds into the next year, but does not offer to rename the budget at time of duplication.
Comment 16 Blou 2014-07-11 12:28:43 UTC
What do you recommend, Katrin?

Moving into next year is not the same as duplicating, but I see where they could collide.
We were unaware of the "duplicate" situation, and the features (simply cloning, and renaming) still seem to have value to us (and certainly the sponsor).
Comment 17 Katrin Fischer 2014-07-11 12:38:53 UTC
Hi Blou,

I'd suggest you take a look at Jonathan's feature and talk to him. I think there is an overlap and it would be good to identify, where your feature does more than his patches do and then add those things separately. From the description - I haven't tested your patches - the only missing piece might be giving the new budget a different name in the same step as the duplicating.
Comment 18 Jonathan Druart 2014-07-11 13:04:32 UTC
(In reply to Blou from comment #16)

You should test the new feature (see bug 12164). It certainly answers to your needs.
Comment 19 Charles Farmer 2014-08-06 21:12:39 UTC Comment hidden (obsolete)
Comment 20 Paola Rossi 2014-08-14 11:30:07 UTC
I've applied the patch against master 3.17.00.013.

I pass the patch to "Signed Off" status.
Comment 21 Paola Rossi 2014-08-14 11:39:55 UTC Comment hidden (obsolete)
Comment 22 Katrin Fischer 2014-08-15 10:34:45 UTC
Created attachment 30827 [details] [review]
[PASSED QA] Bug 7498 - Cloning a budget, enable change of description

Patch sponsored by the CCSR ( http://www.ccsr.qc.ca )

This new patch builds on the work of Bug 12164 by allowing the
user to enter a new name (budget_period_description) for the
cloned budget.

A test was added to t/db_dependent/Budgets.t.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes tests and QA script.
Comment 23 Katrin Fischer 2014-08-15 10:35:26 UTC
Nice feature!
Comment 24 Tomás Cohen Arazi 2014-09-05 14:37:43 UTC
Patch pushed to master.

Thanks Charles!