line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# -*- Mode: cperl; mode: folding; -*- |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package Goo::Thing::bug::Fixer; |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
############################################################################### |
6
|
|
|
|
|
|
|
# Nigel Hamilton |
7
|
|
|
|
|
|
|
# |
8
|
|
|
|
|
|
|
# Copyright Nigel Hamilton 2005 |
9
|
|
|
|
|
|
|
# All Rights Reserved |
10
|
|
|
|
|
|
|
# |
11
|
|
|
|
|
|
|
# Author: Nigel Hamilton |
12
|
|
|
|
|
|
|
# Filename: Goo::Fixer.pm |
13
|
|
|
|
|
|
|
# Description: Make a task module |
14
|
|
|
|
|
|
|
# |
15
|
|
|
|
|
|
|
# Date Change |
16
|
|
|
|
|
|
|
# ----------------------------------------------------------------------------- |
17
|
|
|
|
|
|
|
# 16/10/2005 Auto generated file |
18
|
|
|
|
|
|
|
# 16/10/2005 Need to create a task object |
19
|
|
|
|
|
|
|
# |
20
|
|
|
|
|
|
|
############################################################################### |
21
|
|
|
|
|
|
|
|
22
|
1
|
|
|
1
|
|
2743
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
23
|
|
|
|
|
|
|
|
24
|
1
|
|
|
1
|
|
4
|
use Goo::Object; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
18
|
|
25
|
1
|
|
|
1
|
|
4
|
use Goo::Prompter; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
15
|
|
26
|
1
|
|
|
1
|
|
5
|
use Goo::TeamManager; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
27
|
|
|
|
|
|
|
|
28
|
1
|
|
|
1
|
|
5
|
use base qw(Goo::Object); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
236
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
############################################################################### |
32
|
|
|
|
|
|
|
# |
33
|
|
|
|
|
|
|
# run - make a bug_fixer |
34
|
|
|
|
|
|
|
# |
35
|
|
|
|
|
|
|
############################################################################### |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub run { |
38
|
|
|
|
|
|
|
|
39
|
0
|
|
|
0
|
1
|
|
my ($this, $thing) = @_; |
40
|
|
|
|
|
|
|
|
41
|
0
|
|
|
|
|
|
my $dbo = $thing->get_database_object(); |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
# who was the person who fixed it? |
44
|
0
|
|
|
|
|
|
$dbo->{fixedby} = |
45
|
|
|
|
|
|
|
Goo::Prompter::pick_one("Who fixed it?", Goo::TeamManager::get_all_nick_names()); |
46
|
0
|
|
|
|
|
|
$dbo->{fixedon} = "now()"; |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
# remember how we fixed for the future! |
49
|
0
|
|
|
|
|
|
$dbo->{description} .= Goo::Prompter::ask("How did you fix it (how/when/where/why)?"); |
50
|
|
|
|
|
|
|
|
51
|
0
|
0
|
|
|
|
|
if (Goo::Prompter::confirm("Update the bug to fixed?")) { |
52
|
0
|
|
|
|
|
|
$dbo->{status} = "killed"; |
53
|
0
|
|
|
|
|
|
$dbo->replace(); |
54
|
0
|
|
|
|
|
|
Goo::TeamManager::send_email("Burt the Bug Buster <burt\@thegoo.org>", |
55
|
|
|
|
|
|
|
"$dbo->{fixedby} fixed: $dbo->{title} [BugID $dbo->{bugid}]", |
56
|
|
|
|
|
|
|
$dbo->{description} |
57
|
|
|
|
|
|
|
); |
58
|
|
|
|
|
|
|
|
59
|
0
|
|
|
|
|
|
Goo::Prompter::notify("Bug fixed."); |
60
|
|
|
|
|
|
|
} else { |
61
|
0
|
|
|
|
|
|
Goo::Prompter::notify("Bug not fixed."); |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
1; |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
__END__ |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 NAME |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Goo::Thing::bug::Fixer - Fix a bug |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 SYNOPSIS |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
use Goo::Thing::bug::Fixer; |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 DESCRIPTION |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head1 METHODS |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=over |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=item run |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
make a bug_fixer |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=back |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head1 AUTHOR |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
Nigel Hamilton <nigel@trexy.com> |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head1 SEE ALSO |
100
|
|
|
|
|
|
|
|