Bug 6943 - Create new budget from a copy of a previous budget
Summary: Create new budget from a copy of a previous budget
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: 3.8
Hardware: All All
: P3 enhancement (vote)
Assignee: Chris Hall
QA Contact: Paul Poulain
URL:
Keywords:
Depends on:
Blocks: 7498 7580
  Show dependency treegraph
 
Reported: 2011-09-29 17:41 UTC by Maxime Pelletier
Modified: 2013-12-05 20:01 UTC (History)
4 users (show)

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


Attachments
Screenshot of the new Add budget page (19.19 KB, image/png)
2011-09-29 17:41 UTC, Maxime Pelletier
Details
Patch to add feature (5.91 KB, patch)
2011-09-29 17:41 UTC, Maxime Pelletier
Details | Diff | Splinter Review
Patch to allow duplication of budgets (8.70 KB, patch)
2012-01-05 01:44 UTC, Chris Hall
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 6943: Added ability to duplicate a budget tree (from the edit sub menu) bug 6953 (9.09 KB, patch)
2012-01-16 06:49 UTC, Katrin Fischer
Details | Diff | Splinter Review
Added ability to duplicate a budget (8.88 KB, patch)
2012-01-24 03:12 UTC, Chris Hall
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 6943: Added ability to duplicate a budget tree (from the edit sub menu) (9.26 KB, patch)
2012-01-25 06:25 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 Maxime Pelletier 2011-09-29 17:41:10 UTC
Created attachment 5648 [details]
Screenshot of the new Add budget page

This new feature adds a list of budgets in the Add budget page to create a budget based on a previous.
An exemple use case for this is if you want to create a 2010-2011 budget and want the same funds as the 2009-2010 budget, with the same amounts.
It also has an option called "transfer the order acquisitions" that transfers all the orders not received in the new budget copy.
Comment 1 Maxime Pelletier 2011-09-29 17:41:44 UTC Comment hidden (obsolete)
Comment 2 Maxime Pelletier 2011-09-29 17:42:59 UTC
oh, and once again this was sponsored by our client, http://www.ccsr.qc.ca/.
Comment 3 Maxime Pelletier 2011-10-06 17:06:21 UTC
Comment on attachment 5649 [details] [review]
Patch to add feature

I'm afraid that this was not meant to be sent yet.
I will update this bug once we can really share it.
Comment 4 Katrin Fischer 2011-10-13 06:07:40 UTC
Maxime, can you clarify? The status is 'Needs Signoff' but from your comment I am not sure if this can be included into Koha at this point in time or not.
Comment 5 Maxime Pelletier 2011-10-13 13:03:52 UTC
(In reply to comment #4)
> Maxime, can you clarify? The status is 'Needs Signoff' but from your comment I
> am not sure if this can be included into Koha at this point in time or not.

Yes it can now be included.
Comment 6 Katrin Fischer 2011-10-17 21:15:43 UTC
Patch applies without conflicts, but I get a 404 error when trying to go to /cgi-bin/koha/admin/aqbudgetperiods.pl
Comment 7 Katrin Fischer 2011-12-16 07:28:20 UTC
End of year is near and I think it's the right time to give this a little push :)
Comment 8 Paul Poulain 2011-12-16 15:34:20 UTC
This feature is being worked by catalyst, (sub-contracted by BibLibre, sponsored by french library). Code being validated atm.

(I missed this bugzilla entry, too bad
Comment 9 Katrin Fischer 2011-12-16 16:07:59 UTC
As there is already code for that by Maxime now - perhaps some of it can be reused? I am not sure if the spec biblibre/catalyst have covers all of the functionality or more than described here. Could this made available? There is no RFC on the wiki I think?
Comment 10 Chris Hall 2012-01-05 01:44:27 UTC Comment hidden (obsolete)
Comment 11 Katrin Fischer 2012-01-05 06:17:06 UTC
Hi Chris, does the work from Catalyst also include an option to move the not received orders to the new funds?
Comment 12 Chris Hall 2012-01-05 19:31:21 UTC
(In reply to comment #11)
Hey Katrin
No sorry, the patch only allows for a budget and all its funds to be duplicated (as if you created a new budget with all the same funds and allocated money).
Comment 13 Katrin Fischer 2012-01-16 06:49:33 UTC Comment hidden (obsolete)
Comment 14 Katrin Fischer 2012-01-16 06:54:03 UTC
I looked at Maxime's patch too. 
It still applies but /cgi-bin/koha/admin/aqbudgetperiods.pl gives me a 404.
[Mon Jan 16 07:51:05 2012] [error] [client 127.0.0.1] script not found or unable to stat: /home/katrin/kohaclone/admin/aqbudgetperiods.pl, referer: http://localhost:8080/cgi-bin/koha/acqui/acqui-home.pl
Comment 15 Paul Poulain 2012-01-18 15:53:16 UTC
QA comment:

Looking at your patch chris_h, I see that you've used 2 spaces for indentation. We use 4 spaces in Koha.
I checked http://wiki.koha-community.org/wiki/Coding_Guidelines and saw it was not explicit (it was still in the "discussed"), so I updated the guidelines.

Marking failed QA, please resubmit with 4 tabs

I don't see any other problem
Comment 16 Chris Hall 2012-01-24 03:12:38 UTC Comment hidden (obsolete)
Comment 17 Katrin Fischer 2012-01-25 06:25:36 UTC
Created attachment 7330 [details] [review]
[SIGNED-OFF] Bug 6943: Added ability to duplicate a budget tree (from the edit sub menu)

http://bugs.koha-community.org/show_bug.cgi?id=6943
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
- all new javascript alerts have translations markers _()
- hierarchies and permissions were copied correctly

Possible enhancements:
- make it possible to move orders from old to new funds
- make it possible to change description while copying, saving 1 additional
step
Comment 18 Paul Poulain 2012-02-02 10:14:16 UTC
QA comment:
#2 The code does not respect the HTML3 coding guideline. however, it was submitted before the inclusion of this new behaviour, and there are also many dates managed elsewhere in the script, so maybe it's more consistent
#1 the cloning does not let the user updating the description of the budget. Thus, the cloned budget has exactly the same name as the previous one, only the dates differ. As there is a form to enter the dates of the new budget, why not add the description of the budget ? (pre-filled with the previous value). Would you agree to add this feature to your patch ?

Katrin, as you've signed-off, your opinion is welcomed !

Not marking failed QA, #2 is more a question.
Comment 19 Katrin Fischer 2012-02-02 11:23:23 UTC
Hi Paul, 
see comment 13 ;)
I noted there that an option to edit the description while copying would be good. Still this feature works as advertised and it is useful - so didn't want to scope creep it. :)
Comment 20 Paul Poulain 2012-02-03 16:55:40 UTC
OK, i'm convinced, also because duplicating a budget is something you do once a year, so it's not a big deal.
I'll open a new bug for the enhancement
Comment 21 Owen Leonard 2012-11-27 20:10:22 UTC
(In reply to comment #19)
 
> Possible enhancements:
> - make it possible to change description while copying, saving 1 additional
> step

I have created Bug 9155 for this.