Bug 734632 - the Bug.attachments() xmlrpc function doesn't work for some existing attachments
Summary: the Bug.attachments() xmlrpc function doesn't work for some existing attachments
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Bugzilla
Classification: Community
Component: WebService
Version: 3.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified vote
Target Milestone: ---
Assignee: Simon Green
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 723036
TreeView+ depends on / blocked
 
Reported: 2011-08-31 02:15 UTC by Tony Fu
Modified: 2014-10-12 22:46 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-09-19 03:44:52 UTC


Attachments (Terms of Use)

Description Tony Fu 2011-08-31 02:15:58 UTC
Description of problem:


When using the Bug.attachments() to get some attachments' info, the following error occurs

Can't call method "iso8601" on an undefined value at /var/www/html/bugzilla/Bugzilla/WebService/Server.pm line 60.

How reproducible:

always:

Step:

Using Bug.attachments() to get rh bz attachment #447108 [details]

 
Actual results:
Can't call method "iso8601" on an undefined value at /var/www/html/bugzilla/Bugzilla/WebService/Server.pm line 60.


Expected results:
should return attachment's info


Additional info:
the Bug.attachments() works for some attachments, but doesn't work for others

Comment 1 Simon Green 2011-08-31 04:09:06 UTC
The problem is caused because the modification_date value in the attachment table is set to '0000-00-00'. Trying to convert this to a valid date of course won't work.

This column is set to NOT NULL in the database. Bugzilla::Attachments correctly will set this value to the creation date if it is not specified.

However, the hwcert code directly inserts into the database, and thus as a modification date was not provided, MySQL used '0000-00-00' as the default date for a NOT NULL column.

I have asked Tony to either update his code or (preferably) use the RPC call to add attachments to bugs.

Once this is done, I will then get a sysadmin to run SQL to update the migration date to the creation date when it is set to '0000-00-00'

  -- simon


Note You need to log in before you can comment on or make changes to this bug.