Closed Bug 633041 Opened 14 years ago Closed 14 years ago

Bug.add_attachment is missing an error code and should fill in content_type for patches

Categories

(Bugzilla :: Attachments & Requests, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED
Bugzilla 4.0

People

(Reporter: mkanat, Assigned: mkanat)

References

Details

Attachments

(2 files)

Attached patch v1, for 4.0Splinter Review
When writing the test in bug 629161 I discovered a few issues with Bug.add_attachment: * It was missing an error code for attaching an empty "data" value. * You should be able to set "is_patch => 1" without specifying a content type, and the content type should always be forced to "text/plain" for patches, but the backend wasn't doing this properly.
Flags: blocking4.0+
Attachment #511246 - Flags: review?(LpSolit)
Assignee: attach-and-request → mkanat
Status: NEW → ASSIGNED
Comment on attachment 511246 [details] [diff] [review] v1, for 4.0 Looks good, but only works for 4.0. is_url no longer exists in 4.1.
Attachment #511246 - Attachment description: v1 → v1, for 4.0
Attachment #511246 - Flags: review?(LpSolit) → review+
Attached patch v1, trunkSplinter Review
Okay, here's a similar patch for trunk.
Attachment #511555 - Flags: review?(LpSolit)
Comment on attachment 511555 [details] [diff] [review] v1, trunk >=== modified file 'Bugzilla/Attachment.pm' >+use constant VALIDATOR_DEPENDENCIES => { >+ mimetype => ['ispatch', 'isurl'], >+}; isurl no longer exists on trunk. r=LpSolit with this one removed.
Attachment #511555 - Flags: review?(LpSolit) → review+
Flags: approval4.0+
Flags: approval+
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/ modified Bugzilla/Attachment.pm modified Bugzilla/WebService/Bug.pm modified Bugzilla/WebService/Constants.pm Committed revision 7696. Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/4.0/ modified Bugzilla/Attachment.pm modified Bugzilla/WebService/Bug.pm modified Bugzilla/WebService/Constants.pm Committed revision 7543.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: