[Koha-bugs] [Bug 7046] subscription renewal period should be a pull down

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Oct 31 10:19:41 CET 2018


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7046

--- Comment #13 from Josef Moravec <josef.moravec at gmail.com> ---
Comment on attachment 81642
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81642
Bug 7046: (follow-up) Tidy up to address test feedback

Review of attachment 81642:
 --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=7046&attachment=81642)
-----------------------------------------------------------------

::: C4/Serials.pm
@@ +1453,4 @@
>      return $subscriptionid;
>  }
>  
> +=head2 getsublength

in C4 namespace it should be spelled "GetSubLength" or "GetSubscriptionLength"

::: koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-renew.tt
@@ +65,5 @@
>              [% END %]
>              </option>
>          [% END %]
>      </select>
> +    <input type="text" name="sublength" id="sublength" value="[% sublength | html %]" size="3" />(enter amount in numerals)

The "sublength" param is not passed from perl script, so this input is always
empty

::: t/db_dependent/Serials/ReNewSubscription.t
@@ +85,5 @@
>  # Actual testing starts here!
>  
> +# Calculate the subscription length for the renewal for issues, days and months
> +my ($numberlength, $weeklength, $monthlength) = getsublength('issues', 7);
> +is ( $numberlength, 7, "Sub length is 7 issues");

You should test other variables too.

Also, you should test bad params too - undef, other string, ...

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list