[Bio] / FortyEight / Mantis.pm Repository:
ViewVC logotype

Diff of /FortyEight/Mantis.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1, Thu Oct 4 22:07:31 2007 UTC revision 1.2, Fri Oct 5 17:24:56 2007 UTC
# Line 66  Line 66 
66      # Bug description.      # Bug description.
67      #      #
68    
69        my $sys = $self->info->{system};
70        my $summary = "$sys error detected in job $opts{job_id} stage $opts{stage}";
71    
72      my $descr = "Error reported in job $opts{job_id} in $opts{job_dir}\n";      my $descr = "Error reported in job $opts{job_id} in $opts{job_dir}\n";
73      $descr .= $opts{msg};      $descr .= $opts{msg};
74    
# Line 83  Line 86 
86      my $text_id = $dbh->{mysql_insertid};      my $text_id = $dbh->{mysql_insertid};
87      print "inserted: '$text_id'\n";      print "inserted: '$text_id'\n";
88    
89      $dbh->do(qq(INSERT INTO mantis_bug_table (project_id, reporter_id, date_submitted, last_updated, bug_text_id)      #
90                  VALUES (?, ?, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, ?)), undef,      # Determine if there is an auto-assigned handler for this project & category.
91               $project, $reporter, $text_id);      #
92    
93        my $res = $dbh->selectall_arrayref(qq(SELECT user_id
94                                              FROM mantis_project_category_table
95                                              WHERE project_id = ? AND category = ?), undef,
96                                           $project, $self->info->{bug_category});
97        # print Dumper($res);
98        my $handler = 0;
99        if (@$res)
100        {
101            $handler = $res->[0]->[0];
102        }
103    
104        $dbh->do(qq(INSERT INTO mantis_bug_table (project_id, reporter_id, handler_id, date_submitted, last_updated,
105                                                  bug_text_id, summary, category)
106                    VALUES (?, ?, ?, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, ?, ?, ?)), undef,
107                 $project, $reporter, $handler, $text_id, $summary, $self->info->{bug_category});
108      my $bug_id = $dbh->{mysql_insertid};      my $bug_id = $dbh->{mysql_insertid};
109    
110      my $b = $meta->get_metadata('mantis.bug');      my $b = $meta->get_metadata('mantis.bug');
# Line 148  Line 167 
167          rmdir($tmp);          rmdir($tmp);
168      }      }
169    
170        my $bug_url = $self->info->{public_url} . "/view.php?id=$bug_id";
171        return($bug_id, $bug_url);
172  }  }
173    
174    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3