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