Bug 7342 - aqbudgets statistics doesn't work when using Authorized values on sort1_authcat or sort2_authcat
Summary: aqbudgets statistics doesn't work when using Authorized values on sort1_authc...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: 3.6
Hardware: All All
: P3 normal (vote)
Assignee: Alex Arnaud
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-09 08:35 UTC by Alex Arnaud
Modified: 2013-12-05 20:01 UTC (History)
4 users (show)

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


Attachments
Creating new order (113.30 KB, application/vnd.oasis.opendocument.text)
2011-12-09 08:36 UTC, Alex Arnaud
Details
Changing fund in new order (105.84 KB, application/vnd.oasis.opendocument.text)
2011-12-09 08:37 UTC, Alex Arnaud
Details
Proposed patch (4.73 KB, patch)
2011-12-09 09:47 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 7342: Follow up fixing FSF address and adding use warnings (1.15 KB, patch)
2011-12-10 09:24 UTC, Chris Cormack
Details | Diff | Splinter Review
[SIGNED-OFF] bug 7342 - neworderempty: Fix empty values in statistic 1 and 2 dropboxes (4.90 KB, patch)
2011-12-13 16:09 UTC, Francois Charbonnier
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 7342: Follow up fixing FSF address and adding use warnings (1.32 KB, patch)
2011-12-13 16:10 UTC, Francois Charbonnier
Details | Diff | Splinter Review
Replacement patch (5.11 KB, patch)
2012-01-20 09:05 UTC, Alex Arnaud
Details | Diff | Splinter Review
Signed replacement patch (5.27 KB, patch)
2012-01-23 08:13 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Arnaud 2011-12-09 08:35:28 UTC
2 problems when using Authorized values to fill statisctic 1 or statistic 2 in neworderempty:

1) Values selected in the drop-down list are not saved in database (aqorder.sort1, aqorder.sort2).
   Create a new order (neworderempty.pl), select something in the statistic 1 and statistic 2 drop-down list at the bottom and save. So sort1 and sort2 columns for the related record in aqorder table is empty.


2) When i change the value in fund drop-down list, statistic 1 and 2 are empty.
    On the same page, change the value of fund list. So statistic 1 and 2 are empty.
Comment 1 Alex Arnaud 2011-12-09 08:36:51 UTC
Created attachment 6691 [details]
Creating new order
Comment 2 Alex Arnaud 2011-12-09 08:37:27 UTC
Created attachment 6692 [details]
Changing fund in new order
Comment 3 Alex Arnaud 2011-12-09 08:38:24 UTC
patch is coming soon
Comment 4 Alex Arnaud 2011-12-09 09:47:26 UTC Comment hidden (obsolete)
Comment 5 Chris Cormack 2011-12-10 09:18:24 UTC
Hi Alex

A little thing is this patch, that will cause the tests to fail, is the address for the FSF is wrong

It is 
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

(check mainpage.pl in master).

I wont fail QA it for that, but it will need either a follow up or Paul to fix when he pushes it.
Comment 6 Chris Cormack 2011-12-10 09:24:23 UTC Comment hidden (obsolete)
Comment 7 Francois Charbonnier 2011-12-13 16:09:34 UTC Comment hidden (obsolete)
Comment 8 Francois Charbonnier 2011-12-13 16:10:58 UTC Comment hidden (obsolete)
Comment 9 Francois Charbonnier 2011-12-13 16:25:14 UTC
Test I did :

1/ define authorised values categories that you will use to set up funds.

2/ then set up (at least) 2 funds and choose the categories define above within "Statistic 1 done on:" and "Statistic 2 done on:" fields

3/ create new basket and place one order

4/ when placing the order : choose the funds you created and check that the authorised values within "statistic 1" and "statistic 2" change correctly.

5/ save the orderline and click on "modify" to make sure that the chosen values got recorded

6/ check the database. go to mysql and try : 
SELECT sort1, sort2 FROM aqorders WHERE ordernumber='XXX';

7/ you will have the values you just entered when placing your order.
Comment 10 Marcel de Rooy 2012-01-10 15:19:22 UTC
Just a (dumb) question: Patch creates a new script, but where does Koha call it? Couldn't see that just browsing through..
Comment 11 Marcel de Rooy 2012-01-18 13:08:58 UTC
Still waiting for an answer on earlier comment.
Comment 12 Alex Arnaud 2012-01-18 14:52:48 UTC
Hi Marcel,

This patch RE-creates a script that probably had been deleted by mistake. This script is used by "fetchSortDropbox()" javascript function (in tmpl_dir/prog/en/js/acq.js) which is called by an onchange event on budget_id select in neworderempty.tt.

It's an ajax call in order to fill correctly the 'statistic 1' and 'statistic 2' comboboxes.
Comment 13 Marcel de Rooy 2012-01-19 11:29:53 UTC
Hi ALex,
Thanks for responding.
Just a few minor points: 

I see a POD line with only title of the script ;) See a FIXME after template name. See a new commented line for #my $dropbox_values;
See a 1; at the end of the script (but this is not a module !!)

Could you still adjust ?
Comment 14 Alex Arnaud 2012-01-20 09:05:39 UTC Comment hidden (obsolete)
Comment 15 Marcel de Rooy 2012-01-23 08:13:19 UTC
Created attachment 7289 [details] [review]
Signed replacement patch

Tested. Comments have been incorporated. Marking as Passed QA.
Comment 16 Jared Camins-Esakov 2012-05-23 12:56:41 UTC
This fix was included in the 3.6.x branch prior to 3.6.4.