[Bug 21203] New: ILS-DI - GetRecords crashes on non-existent records

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 21203] New: ILS-DI - GetRecords crashes on non-existent records

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

            Bug ID: 21203
           Summary: ILS-DI - GetRecords crashes on non-existent records
 Change sponsored?: ---
           Product: Koha
           Version: unspecified
          Hardware: All
                OS: All
            Status: ASSIGNED
          Severity: major
          Priority: P5 - low
         Component: Web services
          Assignee: [hidden email]
          Reporter: [hidden email]
        QA Contact: [hidden email]
        Depends on: 18255

Caused by
  commit cb336e633bf7e0cb25051a8ed8157af8486a58d7
  Bug 18255: Koha::Biblio - Replace GetBiblioItemByBiblioNumber with
Koha::Biblio->biblioitem


Can't call method "biblioitem" on an undefined value at
/home/vagrant/kohaclone/C4/ILSDI/Services.pm line 212


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18255
[Bug 18255] Koha::Biblio - Remove GetBiblioItemByBiblioNumber
--
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
|

[Bug 21203] ILS-DI - GetRecords crashes on non-existent records

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

Jonathan Druart <[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
|

[Bug 21203] ILS-DI - GetRecords crashes on non-existent records

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

--- Comment #1 from Jonathan Druart <[hidden email]> ---
Created attachment 77688
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77688&action=edit
Bug 21203: ILS-DI - Make GetRecords handle non-existent records

Caused by
  commit cb336e633bf7e0cb25051a8ed8157af8486a58d7
  Bug 18255: Koha::Biblio - Replace GetBiblioItemByBiblioNumber with
Koha::Biblio->biblioitem

Can't call method "biblioitem" on an undefined value at
/home/vagrant/kohaclone/C4/ILSDI/Services.pm line 212

Test plan:
- Enable ilsdi
- hit /cgi-bin/koha/ilsdi.pl?service=GetRecords&id=X
With X an existing biblionumber and a non existing one

Both requests must succeed

--
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
|

[Bug 21203] ILS-DI - GetRecords crashes on non-existent records

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

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |21202


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21202
[Bug 21202] C4::Items - Remove GetItemsByBiblioitemnumber
--
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
|

[Bug 21203] ILS-DI - GetRecords crashes on non-existent records

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

Martin Renvoize <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Needs Signoff               |Failed QA
                 CC|                            |martin.renvoize@ptfs-europe
                   |                            |.com

--- Comment #2 from Martin Renvoize <[hidden email]> ---
QA Comment: Can we 100% guarantee that there is always 1 and only 1 biblioitem
attached to a biblio object?

Looking at the dbic schema it appears there's no db level constraint for this
(it's a has_many relationship), looking a level up in the Koha::Biblio object
it appears we do indeed fire a ->find rather than using the underlying dbic
relationship, which suggests there's only 1 (or 0) biblioitem attached to a
biblio but there's no test to confirm we actually get a biblioitem object back.

I'd love to see the underlying db constraints added, but would accept a second
check that the biblioitem exists before calling unblessed upon it.

Perhaps I'm being over cautious?

--
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
|

[Bug 21203] ILS-DI - GetRecords crashes on non-existent records

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

--- Comment #3 from Jonathan Druart <[hidden email]> ---
(In reply to Martin Renvoize from comment #2)

> QA Comment: Can we 100% guarantee that there is always 1 and only 1
> biblioitem attached to a biblio object?
>
> Looking at the dbic schema it appears there's no db level constraint for
> this (it's a has_many relationship), looking a level up in the Koha::Biblio
> object it appears we do indeed fire a ->find rather than using the
> underlying dbic relationship, which suggests there's only 1 (or 0)
> biblioitem attached to a biblio but there's no test to confirm we actually
> get a biblioitem object back.
>
> I'd love to see the underlying db constraints added, but would accept a
> second check that the biblioitem exists before calling unblessed upon it.
>
> Perhaps I'm being over cautious?

I do not think this is valid, biblio and biblioitem must be considered 1-1, we
discussed it several times on the mailing lists.
Both tables must be merged, but it's a huge work.

--
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
|

[Bug 21203] ILS-DI - GetRecords crashes on non-existent records

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

Katrin Fischer <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #4 from Katrin Fischer <[hidden email]> ---
I agree with Jonathan - there are bigger issues with our database structure,
but assuming 1:1 is safe for now and we should fix this bug.

--
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
|

[Bug 21203] ILS-DI - GetRecords crashes on non-existent records

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

Martin Renvoize <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Failed QA                   |Signed Off

--- Comment #5 from Martin Renvoize <[hidden email]> ---
OK, I'm happy with that then.. I must have missed the mailing list
conversations regarding their 1-1ness during my absence.

I'll go ahead and complete the QA then. :)

--
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
|

[Bug 21203] ILS-DI - GetRecords crashes on non-existent records

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

Martin Renvoize <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #77688|0                           |1
        is obsolete|                            |

--- Comment #6 from Martin Renvoize <[hidden email]> ---
Created attachment 77777
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77777&action=edit
Bug 21203: ILS-DI - Make GetRecords handle non-existent records

Caused by
  commit cb336e633bf7e0cb25051a8ed8157af8486a58d7
  Bug 18255: Koha::Biblio - Replace GetBiblioItemByBiblioNumber with
Koha::Biblio->biblioitem

Can't call method "biblioitem" on an undefined value at
/home/vagrant/kohaclone/C4/ILSDI/Services.pm line 212

Test plan:
- Enable ilsdi
- hit /cgi-bin/koha/ilsdi.pl?service=GetRecords&id=X
With X an existing biblionumber and a non existing one

Both requests must succeed

Signed-off-by: Martin Renvoize <[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
|

[Bug 21203] ILS-DI - GetRecords crashes on non-existent records

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

--- Comment #7 from Martin Renvoize <[hidden email]> ---
Sorry.. I meant signoff rather than qa there.. Signed Off.

--
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
|

[Bug 21203] ILS-DI - GetRecords crashes on non-existent records

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

Josef Moravec <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Signed Off                  |Passed QA

--
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
|

[Bug 21203] ILS-DI - GetRecords crashes on non-existent records

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

Josef Moravec <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #77777|0                           |1
        is obsolete|                            |

--- Comment #8 from Josef Moravec <[hidden email]> ---
Created attachment 77887
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77887&action=edit
Bug 21203: ILS-DI - Make GetRecords handle non-existent records

Caused by
  commit cb336e633bf7e0cb25051a8ed8157af8486a58d7
  Bug 18255: Koha::Biblio - Replace GetBiblioItemByBiblioNumber with
Koha::Biblio->biblioitem

Can't call method "biblioitem" on an undefined value at
/home/vagrant/kohaclone/C4/ILSDI/Services.pm line 212

Test plan:
- Enable ilsdi
- hit /cgi-bin/koha/ilsdi.pl?service=GetRecords&id=X
With X an existing biblionumber and a non existing one

Both requests must succeed

Signed-off-by: Martin Renvoize <[hidden email]>

Signed-off-by: Josef Moravec <[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
|

[Bug 21203] ILS-DI - GetRecords crashes on non-existent records

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

Josef Moravec <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         QA Contact|[hidden email]-communit |[hidden email]
                   |y.org                       |
                 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/