line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WebService::PivotalTracker::Project; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
26
|
|
4
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
21
|
|
5
|
1
|
|
|
1
|
|
5
|
use namespace::autoclean; |
|
1
|
|
|
|
|
15
|
|
|
1
|
|
|
|
|
5
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.12'; |
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
111
|
use WebService::PivotalTracker::PropertyAttributes; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
48
|
|
10
|
1
|
|
|
1
|
|
394
|
use WebService::PivotalTracker::Story; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
40
|
|
11
|
|
|
|
|
|
|
use WebService::PivotalTracker::Types |
12
|
1
|
|
|
1
|
|
8
|
qw( Bool DateTimeObject DayOfWeek HashRef NonEmptyStr PositiveInt PositiveNum ProjectType Str ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
10
|
|
13
|
|
|
|
|
|
|
|
14
|
1
|
|
|
1
|
|
1538
|
use Moo; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
5
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
has( @{$_} ) for props_to_attributes( |
17
|
|
|
|
|
|
|
id => PositiveInt, |
18
|
|
|
|
|
|
|
name => NonEmptyStr, |
19
|
|
|
|
|
|
|
version => PositiveInt, |
20
|
|
|
|
|
|
|
iteration_length => PositiveInt, |
21
|
|
|
|
|
|
|
week_start_day => DayOfWeek, |
22
|
|
|
|
|
|
|
point_scale => NonEmptyStr, |
23
|
|
|
|
|
|
|
point_scale_is_custom => Bool, |
24
|
|
|
|
|
|
|
bugs_and_chores_are_estimatable => Bool, |
25
|
|
|
|
|
|
|
automatic_planning => Bool, |
26
|
|
|
|
|
|
|
enable_tasks => Bool, |
27
|
|
|
|
|
|
|
start_date => { |
28
|
|
|
|
|
|
|
type => DateTimeObject, |
29
|
|
|
|
|
|
|
inflator => '_inflate_iso8601_datetime', |
30
|
|
|
|
|
|
|
}, |
31
|
|
|
|
|
|
|
time_zone => HashRef, |
32
|
|
|
|
|
|
|
velocity_averaged_over => PositiveInt, |
33
|
|
|
|
|
|
|
show_iterations_start_time => { |
34
|
|
|
|
|
|
|
type => DateTimeObject, |
35
|
|
|
|
|
|
|
inflator => '_inflate_iso8601_datetime', |
36
|
|
|
|
|
|
|
}, |
37
|
|
|
|
|
|
|
start_time => { |
38
|
|
|
|
|
|
|
type => DateTimeObject, |
39
|
|
|
|
|
|
|
inflator => '_inflate_iso8601_datetime', |
40
|
|
|
|
|
|
|
}, |
41
|
|
|
|
|
|
|
number_of_done_iterations_to_show => PositiveInt, |
42
|
|
|
|
|
|
|
has_google_domain => Bool, |
43
|
|
|
|
|
|
|
description => Str, |
44
|
|
|
|
|
|
|
profile_content => Str, |
45
|
|
|
|
|
|
|
enable_incoming_emails => Bool, |
46
|
|
|
|
|
|
|
initial_velocity => PositiveInt, |
47
|
|
|
|
|
|
|
project_type => ProjectType, |
48
|
|
|
|
|
|
|
public => Bool, |
49
|
|
|
|
|
|
|
atom_enabled => Bool, |
50
|
|
|
|
|
|
|
current_iteration_number => PositiveInt, |
51
|
|
|
|
|
|
|
account_id => PositiveInt, |
52
|
|
|
|
|
|
|
created_at => { |
53
|
|
|
|
|
|
|
type => DateTimeObject, |
54
|
|
|
|
|
|
|
inflator => '_inflate_iso8601_datetime', |
55
|
|
|
|
|
|
|
}, |
56
|
|
|
|
|
|
|
updated_at => { |
57
|
|
|
|
|
|
|
type => DateTimeObject, |
58
|
|
|
|
|
|
|
inflator => '_inflate_iso8601_datetime', |
59
|
|
|
|
|
|
|
}, |
60
|
|
|
|
|
|
|
kind => NonEmptyStr, |
61
|
|
|
|
|
|
|
); |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
with 'WebService::PivotalTracker::Entity'; |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
sub memberships { |
66
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
67
|
|
|
|
|
|
|
|
68
|
0
|
|
|
|
|
|
return $self->_pt_api->project_memberships( |
69
|
|
|
|
|
|
|
@_, |
70
|
|
|
|
|
|
|
project_id => $self->id, |
71
|
|
|
|
|
|
|
); |
72
|
|
|
|
|
|
|
} |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
sub stories { |
75
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
return |
78
|
0
|
|
|
|
|
|
map { WebService::PivotalTracker::Story->new( %{$_} ) } |
|
0
|
|
|
|
|
|
|
79
|
0
|
|
|
|
|
|
@{ $self->raw_content->{stories} }; |
|
0
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
} |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
sub iterations { |
83
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
84
|
|
|
|
|
|
|
|
85
|
0
|
|
|
|
|
|
return $self->_pt_api->project_iterations( |
86
|
|
|
|
|
|
|
@_, |
87
|
|
|
|
|
|
|
project_id => $self->id, |
88
|
|
|
|
|
|
|
); |
89
|
|
|
|
|
|
|
} |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
## no critic (Subroutines::ProhibitUnusedPrivateSubroutines) |
92
|
|
|
|
|
|
|
sub _self_uri { |
93
|
0
|
|
|
0
|
|
|
my $self = shift; |
94
|
|
|
|
|
|
|
|
95
|
0
|
|
|
|
|
|
return $self->_client->build_uri( |
96
|
|
|
|
|
|
|
sprintf( |
97
|
|
|
|
|
|
|
'/projects/%s/iterations/%s', |
98
|
|
|
|
|
|
|
$self->id, |
99
|
|
|
|
|
|
|
$self->number, |
100
|
|
|
|
|
|
|
) |
101
|
|
|
|
|
|
|
); |
102
|
|
|
|
|
|
|
} |
103
|
|
|
|
|
|
|
## use critic |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
1; |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
# ABSTRACT: A single iteration in a project |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
__END__ |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=pod |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=encoding UTF-8 |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=head1 NAME |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
WebService::PivotalTracker::Project - A single iteration in a project |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=head1 VERSION |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
version 0.12 |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=head1 SYNOPSIS |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=head1 DESCRIPTION |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
This class represents a single project iteration. |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
=for Test::Synopsis my $pt; |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
my $iterations = $pt->project( project_id => 42 ); |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
This class provides the following attribute accessor methods. Each one |
136
|
|
|
|
|
|
|
corresponds to a property defined by the L<PT REST API V5 project resource |
137
|
|
|
|
|
|
|
docs|https://www.pivotaltracker.com/help/api/rest/v5#project_resource>. |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
=head2 id |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
=head2 name |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
=head2 version |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
=head2 iteration_length |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=head2 week_start_day |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
=head2 point_scale |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
=head2 point_scale_is_custom |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
=head2 automatic_planning |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
=head2 enable_tasks |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
=head2 start_date |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
This will be returned as a L<DateTime> object. |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
=head2 time_zone |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
=head2 velocity_averaged_over |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
=head2 show_iterations_start_time |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
This will be returned as a L<DateTime> object. |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
=head2 start_time |
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
This will be returned as a L<DateTime> object. |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
=head2 number_of_done_iterations_to_show |
174
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
=head2 has_google_domain |
176
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
=head2 description |
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
=head2 profile_content |
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
=head2 enable_incoming_emails |
182
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
=head2 initial_velocity |
184
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
=head2 project_type |
186
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
=head2 public |
188
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
=head2 atom_enabled |
190
|
|
|
|
|
|
|
|
191
|
|
|
|
|
|
|
=head2 current_iteration_number |
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
=head2 account_id |
194
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
=head2 created_id |
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
This will be returned as a L<DateTime> object. |
198
|
|
|
|
|
|
|
|
199
|
|
|
|
|
|
|
=head2 updated_at |
200
|
|
|
|
|
|
|
|
201
|
|
|
|
|
|
|
This will be returned as a L<DateTime> object. |
202
|
|
|
|
|
|
|
|
203
|
|
|
|
|
|
|
=head2 kind |
204
|
|
|
|
|
|
|
|
205
|
|
|
|
|
|
|
=head2 raw_content |
206
|
|
|
|
|
|
|
|
207
|
|
|
|
|
|
|
The raw JSON used to create this object. |
208
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
=head1 METHODS |
210
|
|
|
|
|
|
|
|
211
|
|
|
|
|
|
|
This class provides the following methods: |
212
|
|
|
|
|
|
|
|
213
|
|
|
|
|
|
|
=head2 $project->memberships(...) |
214
|
|
|
|
|
|
|
|
215
|
|
|
|
|
|
|
This method returns an array reference of |
216
|
|
|
|
|
|
|
L<WebService::PivotalTracker::ProjectMembership> objects, one for each member |
217
|
|
|
|
|
|
|
of the project. |
218
|
|
|
|
|
|
|
|
219
|
|
|
|
|
|
|
=head2 $project->stories(...) |
220
|
|
|
|
|
|
|
|
221
|
|
|
|
|
|
|
This method returns an array of L<WebService::PivotalTracker::Story> objects, |
222
|
|
|
|
|
|
|
one for each story in the project. |
223
|
|
|
|
|
|
|
|
224
|
|
|
|
|
|
|
=head2 $project->iterations(...) |
225
|
|
|
|
|
|
|
|
226
|
|
|
|
|
|
|
This method returns an array reference of |
227
|
|
|
|
|
|
|
L<WebService::PivotalTracker::ProjectIteration> objects based on the provided |
228
|
|
|
|
|
|
|
arguments. |
229
|
|
|
|
|
|
|
|
230
|
|
|
|
|
|
|
This method accepts the following arguments: |
231
|
|
|
|
|
|
|
|
232
|
|
|
|
|
|
|
=over 4 |
233
|
|
|
|
|
|
|
|
234
|
|
|
|
|
|
|
=item * label |
235
|
|
|
|
|
|
|
|
236
|
|
|
|
|
|
|
A label on which to filter the stories contained in each iteration object. |
237
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
=item * limit |
239
|
|
|
|
|
|
|
|
240
|
|
|
|
|
|
|
The number of items to be returned. If not specified the default number of |
241
|
|
|
|
|
|
|
iterations will be returned. |
242
|
|
|
|
|
|
|
|
243
|
|
|
|
|
|
|
=item * offset |
244
|
|
|
|
|
|
|
|
245
|
|
|
|
|
|
|
The offset at which to start returning results. |
246
|
|
|
|
|
|
|
|
247
|
|
|
|
|
|
|
=item * scope |
248
|
|
|
|
|
|
|
|
249
|
|
|
|
|
|
|
The scope of the iterations to return. This can be one of the following |
250
|
|
|
|
|
|
|
strings: |
251
|
|
|
|
|
|
|
|
252
|
|
|
|
|
|
|
=over 8 |
253
|
|
|
|
|
|
|
|
254
|
|
|
|
|
|
|
=item done |
255
|
|
|
|
|
|
|
|
256
|
|
|
|
|
|
|
=item current |
257
|
|
|
|
|
|
|
|
258
|
|
|
|
|
|
|
=item backlog |
259
|
|
|
|
|
|
|
|
260
|
|
|
|
|
|
|
=item current_backlog |
261
|
|
|
|
|
|
|
|
262
|
|
|
|
|
|
|
=item done_current |
263
|
|
|
|
|
|
|
|
264
|
|
|
|
|
|
|
=back |
265
|
|
|
|
|
|
|
|
266
|
|
|
|
|
|
|
By default all iterations are returned, including done iterations. |
267
|
|
|
|
|
|
|
|
268
|
|
|
|
|
|
|
=back |
269
|
|
|
|
|
|
|
|
270
|
|
|
|
|
|
|
=head1 SUPPORT |
271
|
|
|
|
|
|
|
|
272
|
|
|
|
|
|
|
Bugs may be submitted through L<https://github.com/maxmind/WebService-PivotalTracker/issues>. |
273
|
|
|
|
|
|
|
|
274
|
|
|
|
|
|
|
=head1 AUTHOR |
275
|
|
|
|
|
|
|
|
276
|
|
|
|
|
|
|
Dave Rolsky <autarch@urth.org> |
277
|
|
|
|
|
|
|
|
278
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
279
|
|
|
|
|
|
|
|
280
|
|
|
|
|
|
|
This software is Copyright (c) 2016 - 2020 by MaxMind, Inc. |
281
|
|
|
|
|
|
|
|
282
|
|
|
|
|
|
|
This is free software, licensed under: |
283
|
|
|
|
|
|
|
|
284
|
|
|
|
|
|
|
The Artistic License 2.0 (GPL Compatible) |
285
|
|
|
|
|
|
|
|
286
|
|
|
|
|
|
|
=cut |