Bug 14649: Followup - correct budget_period_id in fund name link
authorFridolin Somers <fridolin.somers@biblibre.com>
Thu, 6 Aug 2015 07:36:42 +0000 (09:36 +0200)
committerChris Cormack <chris@bigballofwax.co.nz>
Tue, 22 Sep 2015 02:06:35 +0000 (14:06 +1200)
Now that fund name is displayed in the table as a link, you see that arg budget_period_id is never defined in this link.

This is because the template var is [% budget_line.budget_period_id %] instead of [% budget_period_id %].
This looks like a mistake when converting from tmpl to tt.

Test plan :
- Without patch
- Look for a planning with funds :
    /cgi-bin/koha/admin/aqplan.pl?budget_period_id=2&authcat=MONTHS
- Click on a fund name
=> You see in URL that budget_period_id is empty :
    /cgi-bin/koha/admin/aqbudgets.pl?op=add_form&budget_id=6&budget_period_id=
- Apply patch
- Look for a planning with funds :
    /cgi-bin/koha/admin/aqplan.pl?budget_period_id=2&authcat=MONTHS
- Click on a fund name
=> you see in URL that budget_period_id is defined like in planning page :
    /cgi-bin/koha/admin/aqbudgets.pl?op=add_form&budget_id=6&budget_period_id=2

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fc4f7fe67577917df9ca4201257bea822832a3c4)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt

index 89c7456..2510d04 100644 (file)
         [% ELSE %]
             <td>
         [% END %]
-        <a href="/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&amp;budget_id=[% budget_line.budget_id %]&amp;budget_period_id=[% budget_line.budget_period_id %]">[% budget_line.budget_name %]</a></td>
+        <a href="/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&amp;budget_id=[% budget_line.budget_id %]&amp;budget_period_id=[% budget_period_id %]">[% budget_line.budget_name %]</a></td>
         <td><span id="[% budget_line.budget_amount %]">[% budget_line.budget_amount | $Price %]&nbsp;</span>