Bug 8932 - can't delete order
Summary: can't delete order
Status: CLOSED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: 3.10
Hardware: All All
: P5 - low critical (vote)
Assignee: Bugs List
QA Contact:
URL: /cgi-bin/koha/acqui/parcel.pl?invoice...
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-16 17:48 UTC by Nicole C. Engard
Modified: 2019-06-27 09:24 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicole C. Engard 2012-10-16 17:48:44 UTC
In acquisitions when I try to 'Delete order and catalog record' I get the following:

Software error:

Can't call method "as_usmarc" on an undefined value at /home/nengard/kohaclone/C4/Items.pm line 621.

For help, please send mail to the webmaster (webmaster@debian), giving this error message and the time and date of the error.


The same thing happens if I just click 'Delete order'
Comment 1 Paul Poulain 2012-11-21 16:04:27 UTC
Trying to reproduce the problem, I don't have it, it work for me.

looking at line 621, it contains:
    $copy2deleted->execute( $record->as_usmarc(), $itemnumber );

$record is retrieved a few lines before:
    my $record = GetMarcBiblio($biblionumber);

was your record here when you clicked on "Delete order and catalog record" ?

If it wasn't, I think that's the explanation for the bug.
(and the fix should be easy)
Comment 2 Nicole C. Engard 2012-11-21 16:30:13 UTC
I'm not sure where 'here' is.  You asked 'was your record here when...'
Comment 3 Paul Poulain 2012-11-21 16:42:30 UTC
(In reply to comment #2)
> I'm not sure where 'here' is.  You asked 'was your record here when...'
do you imply my english is poor ? ;-)

my question was: are you sure the bibliographic record attached to your order was still existing ? because ->as_usmarc is failing when $record is not a MARC::Record
And it's not a MARC::Record if GetMarcBiblio could not find it

HTH
Comment 4 Nicole C. Engard 2012-11-21 17:05:18 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > I'm not sure where 'here' is.  You asked 'was your record here when...'
> do you imply my english is poor ? ;-)

I imply no such thing! :) Just that you needed to be more thorough :)

> 
> my question was: are you sure the bibliographic record attached to your
> order was still existing ? because ->as_usmarc is failing when $record is
> not a MARC::Record
> And it's not a MARC::Record if GetMarcBiblio could not find it

Let me try it again and get back to you.

Nicole
Comment 5 Nicole C. Engard 2012-11-21 17:07:43 UTC
Okay, I tested and was able to delete - so I have no idea what version I was in when this happened - but let's say it's invalid.

Nicole