[Koha-bugs] [Bug 20941] Displaying requests does not display request material type

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Oct 2 17:47:48 CEST 2018


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

--- Comment #4 from Josef Moravec <josef.moravec at gmail.com> ---
Comment on attachment 79577
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=79577
Bug 20941: Add Illrequest->getType method

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

::: Koha/Illrequest.pm
@@ +724,4 @@
>          || "";                  # "the empty prefix"
>  }
>  
> +=head3 getType

should be get_type, or maybe better get_material_type, please rename the method

@@ +734,5 @@
> +
> +sub getType {
> +    my ($self) = @_;
> +    my $attr = $self->illrequestattributes->find({ type => 'type'});
> +    return $attr ? $attr->value : '<span>N/A</span>';

We should return implicit undef if no type is set and then handle it in
templates.

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


More information about the Koha-bugs mailing list