diff options
author | bbaetz%student.usyd.edu.au <> | 2002-08-12 12:42:42 +0000 |
---|---|---|
committer | bbaetz%student.usyd.edu.au <> | 2002-08-12 12:42:42 +0000 |
commit | 61ddf0a32846fdf2607043d94af1a0a86b80f6fc (patch) | |
tree | 714517b4c6b9e33b10a12aa5a4b99641bcafefef /bug_form.pl | |
parent | 17b301e76d886afd5be8f4e9919afb4446e49405 (diff) | |
download | bugs-61ddf0a32846fdf2607043d94af1a0a86b80f6fc.tar bugs-61ddf0a32846fdf2607043d94af1a0a86b80f6fc.tar.gz bugs-61ddf0a32846fdf2607043d94af1a0a86b80f6fc.tar.bz2 bugs-61ddf0a32846fdf2607043d94af1a0a86b80f6fc.tar.xz bugs-61ddf0a32846fdf2607043d94af1a0a86b80f6fc.zip |
Bug 43600 - Convert products/components to use ids instead of names.
Initial attempt by jake@bugzilla.org, updated by me
r=joel, preed
Diffstat (limited to 'bug_form.pl')
-rw-r--r-- | bug_form.pl | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/bug_form.pl b/bug_form.pl index 65c7b41c1..fb6a60112 100644 --- a/bug_form.pl +++ b/bug_form.pl @@ -77,19 +77,27 @@ sub show_bug { # Populate the bug hash with the info we get directly from the DB. my $query = " - SELECT bugs.bug_id, alias, product, version, rep_platform, + SELECT bugs.bug_id, alias, products.name, version, rep_platform, op_sys, bug_status, resolution, priority, - bug_severity, component, assigned_to, reporter, + bug_severity, components.name, assigned_to, reporter, bug_file_loc, short_desc, target_milestone, qa_contact, status_whiteboard, date_format(creation_ts,'%Y-%m-%d %H:%i'), groupset, delta_ts, sum(votes.count) - FROM bugs LEFT JOIN votes USING(bug_id) + FROM bugs LEFT JOIN votes USING(bug_id), products, components WHERE bugs.bug_id = $id + AND bugs.product_id = products.id + AND bugs.component_id = components.id GROUP BY bugs.bug_id"; SendSQL($query); + # The caller is meant to have checked this. Abort here so that + # we don't get obscure SQL errors, below + if (!MoreSQLData()) { + ThrowCodeError("No data when fetching bug $id"); + } + my $value; my @row = FetchSQLData(); foreach my $field ("bug_id", "alias", "product", "version", "rep_platform", |