Hi, In More > Administration > Acquisitions > Budgets, it could be great when you choose to duplicate a budget from one year to the next, to be able to keep the users(aqbudgetborrowers) associated with that budget. Users are useful in particular to receive orders from a particular fund. Currently, this functionality retrieves only the owner and funds associated with a budget. This enhancement could be optionnal using a checkbox in the "duplicate budget" view to enable/disable the copy of user ? What do you think about it ? Thanks, Best, Julien Sicot Université Rennes 2
I like the idea of a checkbox, but feel that the current behaviour could also be seen as a bug!
Created attachment 127400 [details] Bug 27550: "Duplicate budget" does not keep users associated with that budget Once a budget is duplicated, all the parameters are copied except the Users Test plan : Home > Administration > Budgets 1)Create a budget to allow (active or inactive) 2)Give it some funds by filling up the form, especially Owner and User(s) 3)Submit then you go back to the Budgets dashboard 4)Duplicate the Budget and click on its name 5)Edit it and notice that User(s) is empty 6)Apply the patch 7)Repeat from 1) to 5)
Created attachment 127975 [details] [review] Bug 27550: "Duplicate budget" does not keep users associated with that budget When a budget is duplicated, Owner is copied but not Users Test plan : Home > Administration > Budgets 1)Create a budget to allow (active or inactive) 2)Give it some funds by filling up the form, especially Owner and User(s) 3)Submit then go back to the Budgets dashboard 4)Duplicate the Budget and click on its name 5)Edit it and notice that User(s) is empty 6)Apply the patch 7)Repeat from 1) to 5)
The patch works as expected.
Created attachment 127975 [details] [review] [review] Bug 27550: "Duplicate budget" does not keep users associated with that budget When a budget is duplicated, Owner is copied but not Users Test plan : Home > Administration > Budgets 1)Create a budget to allow (active or inactive) 2)Give it some funds by filling up the form, especially Owner and User(s) 3)Submit then go back to the Budgets dashboard 4)Duplicate the Budget and click on its name 5)Edit it and notice that User(s) is empty 6)Apply the patch 7)Repeat from 1) to 5) Signed-off-by: Samu Heiskanen <samu.heiskanen@hypernova.fi>
Created attachment 128050 [details] [review] Bug 27550: "Duplicate budget" does not keep users associated with that budget When a budget is duplicated, Owner is copied but not Users Test plan : Home > Administration > Budgets 1)Create a budget to allow (active or inactive) 2)Give it some funds by filling up the form, especially Owner and User(s) 3)Submit then go back to the Budgets dashboard 4)Duplicate the Budget and click on its name 5)Edit it and notice that User(s) is empty 6)Apply the patch 7)Repeat from 1) to 5) Signed-off-by: Samu Heiskanen <samu.heiskanen@hypernova.fi>
Missing test coverage.
Would someone be willing to step up and write the necessary tests here so we can get this bug fixed?
Created attachment 140334 [details] [review] Bug 27550: Add unit test for CloneBudgetHierarchy
(In reply to Julian Maurice from comment #9) > Created attachment 140334 [details] [review] [review] > Bug 27550: Add unit test for CloneBudgetHierarchy Thank you, Julian :)
Created attachment 140400 [details] [review] Bug 27550: "Duplicate budget" does not keep users associated with that budget When a budget is duplicated, Owner is copied but not Users Test plan : Home > Administration > Budgets 1)Create a budget to allow (active or inactive) 2)Give it some funds by filling up the form, especially Owner and User(s) 3)Submit then go back to the Budgets dashboard 4)Duplicate the Budget and click on its name 5)Edit it and notice that User(s) is empty 6)Apply the patch 7)Repeat from 1) to 5) Signed-off-by: Samu Heiskanen <samu.heiskanen@hypernova.fi> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 140401 [details] [review] Bug 27550: Add unit test for CloneBudgetHierarchy Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Pushed to master for 22.11. Nice work everyone, thanks!
Backported to 22.05.x for upcoming 22.05.07 release
applied to 21.11 for 21.11.14
Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed. Nothing to document it seems, marking resolved.