[Bug 18785] New: Add Koha::Subscription::biblio

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 18785] New: Add Koha::Subscription::biblio

bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18785

            Bug ID: 18785
           Summary: Add Koha::Subscription::biblio
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: ASSIGNED
          Severity: enhancement
          Priority: P5 - low
         Component: Architecture, internals, and plumbing
          Assignee: [hidden email]
          Reporter: [hidden email]
        QA Contact: [hidden email]

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 18785] Add Koha::Subscription::biblio

bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18785

--- Comment #1 from Julian Maurice <[hidden email]> ---
Created attachment 64197
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64197&action=edit
Bug 18785: Add Koha::Subscription::biblio

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 18785] Add Koha::Subscription::biblio

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18785

Julian Maurice <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |Needs Signoff

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 18785] Add Koha::Subscription::biblio

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18785

Julian Maurice <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Patch complexity|---                         |Trivial patch

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 18785] Add Koha::Subscription::biblio

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18785

Julian Maurice <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |18426


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18426
[Bug 18426] Subscriptions batch editing
--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 18785] Add Koha::Subscription::biblio

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18785

--- Comment #2 from M. Tompsett <[hidden email]> ---
Comment on attachment 64197
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64197
Bug 18785: Add Koha::Subscription::biblio

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

::: Koha/Subscription.pm
@@ +44,5 @@
> +
> +sub biblio {
> +    my ($self) = @_;
> +
> +    return Koha::Biblios->find($self->biblionumber);

There are a bunch of other bugzilla issues related to ->find and a scalar
context.
Perhapts actually using ->find({ biblionumber => $self->biblionumber }); or
I think others get lazy ->find( scalar $self->biblionumber )... or was it
return scalar Koha::Biblios->find($self->biblionumber);
Hmmm... anyways, this isn't right, as far as I can tell.
Plus if it is singular, then why Biblios? This is the part I don't understand
in this and other code.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 18785] Add Koha::Subscription::biblio

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18785

M. Tompsett <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Needs Signoff               |In Discussion
                 CC|                            |[hidden email]

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 18785] Add Koha::Subscription::biblio

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18785

Julian Maurice <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|In Discussion               |Needs Signoff

--- Comment #3 from Julian Maurice <[hidden email]> ---
(In reply to M. Tompsett from comment #2)
> There are a bunch of other bugzilla issues related to ->find and a scalar
> context.
> Perhapts actually using ->find({ biblionumber => $self->biblionumber }); or
> I think others get lazy ->find( scalar $self->biblionumber )... or was it
> return scalar Koha::Biblios->find($self->biblionumber);
> Hmmm... anyways, this isn't right, as far as I can tell.
I assume you are talking about bug 18179, but the patch I wrote doesn't make
any call to 'find' in a list context. Plus, there is a check in
Koha::Objects::find that prevents it to be used in a list context, so I think
we're good. Callers of Koha::Subsbcription::biblio will be the ones to have to
make sure it's called in scalar context.

> Plus if it is singular, then why Biblios? This is the part I don't
> understand in this and other code.
The 'find' subroutine is defined in Koha::Objects, not Koha::Object.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 18785] Add Koha::Subscription::biblio

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18785

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Needs Signoff               |Failed QA
                 CC|                            |[hidden email]-c
                   |                            |ommunity.org

--- Comment #4 from Jonathan Druart <[hidden email]> ---
Julian you must force the context to make sure the following code will not
explode:

  my $s = Koha::Subscriptions->find(42);
  $template->param( biblio => $s->biblio );

Cannot use "->find" in list context at
/home/vagrant/kohaclone/Koha/Subscription.pm line 48.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Loading...