Closed Bug 122922 (bz-bugwrite) Opened 23 years ago Closed 15 years ago

Use Bug.pm to write changes and new bugs to the database

Categories

(Bugzilla :: Creating/Changing Bugs, enhancement, P1)

2.15
enhancement

Tracking

()

RESOLVED FIXED
Bugzilla 4.0

People

(Reporter: jayvdb, Assigned: mkanat)

References

(Blocks 2 open bugs)

Details

(Keywords: meta)

Attachments

(2 files)

This version of Bug.pm provides a useful Bugzilla API, although it suffers from the globals of Bugzilla. Given the extent to which this branch improves Bug.pm, I would be great if only the current functionality of Bug.pm is required to be tested, the rest then able to be tested and fixed as developers find the need.
Blocks: 6422
Priority: -- → P2
Target Milestone: --- → Bugzilla 2.18
Attachment #67386 - Attachment is patch: false
Comment on attachment 67384 [details] [diff] [review] patch to use allow previously blank fields Can we get a patch against current CVS? Also, I'd like to know that someone plans on using this before hand, so that it doesn'tsuffer bitrot.
Attachment #67384 - Flags: review-
*** Bug 181444 has been marked as a duplicate of this bug. ***
Is it fair to say that this branch is now so old that nothing can be salvaged which it wouldn't be easier to reimplement? Gerv
Believe it or not, it's not. There's a ton of useful stuff in here that never made it on the trunk. Although I'm sure we'll do it better, there's code in here we can certainly take :)
Theres lots of concepts, although I'm not sure how much code; I've rewroked Bug.pm a fair bit in the mean time.
Dave said: > There's a ton of useful stuff in here that never made it on the trunk. Can you be more specific? Gerv
All 2.18 bugs that haven't been touched in over 60 days and aren't flagged as blockers are getting pushed out to 2.20
Target Milestone: Bugzilla 2.18 → Bugzilla 2.20
Changing bug to reflect the current scope of what we want. Not sure how much is on that branch that'll actually be usable anymore. I'm fairly certain the API it was using isn't what we want. What needs to be done here is to get all of this "changing the bug" code from post_bug, process_bug, and attachment.cgi, and get it implemented as methods of Bug.pm, and allow Bug.pm to write back to the database, including access control, so that the Bugzilla::Bug object itself enforces who is allowed to make what changes (the CGI would then look at return codes or exception objects or something along those lines to decide if it needed to throw an error). The Bug object should also handle updates to the activity records, so that code is centralized (currently, activity table updates are duplicated in a few different places (attachment.cgi comes to mind)). This would also greatly simplify life for the inbound email code, which currently duplicates a LOT of code from post_bug and process_bug.
Summary: CYEH_20000628_BRANCH Bug.pm → Allow Bug.pm to write to the database
Blocks: bz-majorarch
Severity: major → enhancement
Alias: bz-bugwrite
I think that in order to allow mass-updates of bugs using Bug objects, there should be an "fail_on_error" param when you create a bug -- if "fail_on_error" is true, then we ThrowUserError for errors. If "fail_on_error" is false, we pass back an error status. That way, not every caller has to check if we failed, only the mass-read or mass-update callers.
Depends on: 283926
Assignee: myk → mkanat
Target Milestone: Bugzilla 2.20 → Bugzilla 2.22
Blocks: webservices
Blocks: 288296
The trunk is now frozen to prepare Bugzilla 2.22. Enhancement bugs are retargetted to 2.24.
Target Milestone: Bugzilla 2.22 → Bugzilla 2.24
Blocks: bz-email-in
Keywords: meta
Summary: Allow Bug.pm to write to the database → Use Bug.pm to write changes and new bugs to the database
Blocks: bz-postbugpm
No longer blocks: bz-postbugpm
Depends on: bz-postbugpm
No longer depends on: 283926
Blocks: bz-roadmap
Blocks: 335437
QA Contact: mattyt-bugzilla → default-qa
Blocks: 174988
No longer blocks: 335437
Whiteboard: [roadmap: 3.2]
Target Milestone: Bugzilla 3.0 → Bugzilla 3.2
Depends on: bz-process_bug
Priority: P2 → P1
Flags: blocking3.2+
Blocks: bz-ws-update
No longer blocks: bz-ws-update
Depends on: 415541
The rest of this bug will be done in 4.0. Bug 367914 may still be a 3.2 blocker, though.
Flags: blocking3.2+ → blocking3.2-
Target Milestone: Bugzilla 3.2 → Bugzilla 4.0
Depends on: 413183
Depends on: 413215
Whiteboard: [roadmap: 3.2]
This is now done. :-)
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: Bugzilla 4.0 → Bugzilla 3.8
Blocks: 1233904
No longer blocks: 1233904
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: