|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace JiraRestApi\Issue; |
|
4
|
|
|
|
|
5
|
|
|
/** |
|
6
|
|
|
* Class TimeTracking. |
|
7
|
|
|
*/ |
|
8
|
|
|
class TimeTracking implements \JsonSerializable |
|
9
|
|
|
{ |
|
10
|
|
|
/** |
|
11
|
|
|
* Original estimate. |
|
12
|
|
|
* |
|
13
|
|
|
* @var string (ex 90m, 2h, 1d 2h 30m) |
|
14
|
|
|
*/ |
|
15
|
|
|
public $originalEstimate; |
|
16
|
|
|
|
|
17
|
|
|
/** |
|
18
|
|
|
* Remaining estimate. |
|
19
|
|
|
* |
|
20
|
|
|
* @var string (ex 90m, 2h, 1d 2h 30m) |
|
21
|
|
|
*/ |
|
22
|
|
|
public $remainingEstimate; |
|
23
|
|
|
|
|
24
|
|
|
/** |
|
25
|
|
|
* Time spent. |
|
26
|
|
|
* |
|
27
|
|
|
* @var string (ex 90m, 2h, 1d 2h 30m) |
|
28
|
|
|
*/ |
|
29
|
|
|
public $timeSpent; |
|
30
|
|
|
|
|
31
|
|
|
/** |
|
32
|
|
|
* Original estimate in seconds, generated in jira |
|
33
|
|
|
* for create/update issue set $this->originalEstimate. |
|
34
|
|
|
* |
|
35
|
|
|
* @var int |
|
36
|
|
|
*/ |
|
37
|
|
|
public $originalEstimateSeconds; |
|
38
|
|
|
|
|
39
|
|
|
/** |
|
40
|
|
|
* Remaining estimate in seconds, generated in jira |
|
41
|
|
|
* for create/update issue set $this->remainingEstimate. |
|
42
|
|
|
* |
|
43
|
|
|
* @var int |
|
44
|
|
|
*/ |
|
45
|
|
|
public $remainingEstimateSeconds; |
|
46
|
|
|
|
|
47
|
|
|
/** |
|
48
|
|
|
* Time spent in seconds, generated in jira |
|
49
|
|
|
* for create/update issue set $this->timeSpent. |
|
50
|
|
|
* |
|
51
|
|
|
* @var int |
|
52
|
|
|
*/ |
|
53
|
|
|
public $timeSpentSeconds; |
|
54
|
|
|
|
|
55
|
|
|
/** |
|
56
|
|
|
* @return string |
|
57
|
|
|
*/ |
|
58
|
|
|
public function getOriginalEstimate() |
|
59
|
|
|
{ |
|
60
|
|
|
return $this->originalEstimate; |
|
61
|
|
|
} |
|
62
|
|
|
|
|
63
|
|
|
/** |
|
64
|
|
|
* @param string $originalEstimate |
|
65
|
|
|
*/ |
|
66
|
|
|
public function setOriginalEstimate($originalEstimate) |
|
67
|
|
|
{ |
|
68
|
|
|
$this->originalEstimate = $originalEstimate; |
|
69
|
|
|
} |
|
70
|
|
|
|
|
71
|
|
|
/** |
|
72
|
|
|
* @return string |
|
73
|
|
|
*/ |
|
74
|
|
|
public function getRemainingEstimate() |
|
75
|
|
|
{ |
|
76
|
|
|
return $this->remainingEstimate; |
|
77
|
|
|
} |
|
78
|
|
|
|
|
79
|
|
|
/** |
|
80
|
|
|
* @param string $remainingEstimate |
|
81
|
|
|
*/ |
|
82
|
|
|
public function setRemainingEstimate($remainingEstimate) |
|
83
|
|
|
{ |
|
84
|
|
|
$this->remainingEstimate = $remainingEstimate; |
|
85
|
|
|
} |
|
86
|
|
|
|
|
87
|
|
|
/** |
|
88
|
|
|
* @return string |
|
89
|
|
|
*/ |
|
90
|
|
|
public function getTimeSpent() |
|
91
|
|
|
{ |
|
92
|
|
|
return $this->timeSpent; |
|
93
|
|
|
} |
|
94
|
|
|
|
|
95
|
|
|
/** |
|
96
|
|
|
* @param string $timeSpent |
|
97
|
|
|
*/ |
|
98
|
|
|
public function setTimeSpent($timeSpent) |
|
99
|
|
|
{ |
|
100
|
|
|
$this->timeSpent = $timeSpent; |
|
101
|
|
|
} |
|
102
|
|
|
|
|
103
|
|
|
/** |
|
104
|
|
|
* @return int |
|
105
|
|
|
*/ |
|
106
|
|
|
public function getOriginalEstimateSeconds() |
|
107
|
|
|
{ |
|
108
|
|
|
return $this->originalEstimateSeconds; |
|
109
|
|
|
} |
|
110
|
|
|
|
|
111
|
|
|
/** |
|
112
|
|
|
* @param int $originalEstimateSeconds |
|
113
|
|
|
*/ |
|
114
|
|
|
public function setOriginalEstimateSeconds($originalEstimateSeconds) |
|
115
|
|
|
{ |
|
116
|
|
|
$this->originalEstimateSeconds = $originalEstimateSeconds; |
|
117
|
|
|
} |
|
118
|
|
|
|
|
119
|
|
|
/** |
|
120
|
|
|
* @return int |
|
121
|
|
|
*/ |
|
122
|
|
|
public function getRemainingEstimateSeconds() |
|
123
|
|
|
{ |
|
124
|
|
|
return $this->remainingEstimateSeconds; |
|
125
|
|
|
} |
|
126
|
|
|
|
|
127
|
|
|
/** |
|
128
|
|
|
* @param int $remainingEstimateSeconds |
|
129
|
|
|
*/ |
|
130
|
|
|
public function setRemainingEstimateSeconds($remainingEstimateSeconds) |
|
131
|
|
|
{ |
|
132
|
|
|
$this->remainingEstimateSeconds = $remainingEstimateSeconds; |
|
133
|
|
|
} |
|
134
|
|
|
|
|
135
|
|
|
/** |
|
136
|
|
|
* @return int |
|
137
|
|
|
*/ |
|
138
|
|
|
public function getTimeSpentSeconds() |
|
139
|
|
|
{ |
|
140
|
|
|
return $this->timeSpentSeconds; |
|
141
|
|
|
} |
|
142
|
|
|
|
|
143
|
|
|
/** |
|
144
|
|
|
* @param int $timeSpentSeconds |
|
145
|
|
|
*/ |
|
146
|
|
|
public function setTimeSpentSeconds($timeSpentSeconds) |
|
147
|
|
|
{ |
|
148
|
|
|
$this->timeSpentSeconds = $timeSpentSeconds; |
|
149
|
|
|
} |
|
150
|
|
|
|
|
151
|
|
|
/** |
|
152
|
|
|
* (PHP 5 >= 5.4.0)<br/> |
|
153
|
|
|
* Specify data which should be serialized to JSON. |
|
154
|
|
|
* |
|
155
|
|
|
* @link http://php.net/manual/en/jsonserializable.jsonserialize.php |
|
156
|
|
|
* |
|
157
|
|
|
* @return mixed data which can be serialized by <b>json_encode</b>, |
|
158
|
|
|
* which is a value of any type other than a resource. |
|
159
|
|
|
*/ |
|
160
|
|
|
public function jsonSerialize() |
|
161
|
|
|
{ |
|
162
|
|
|
return array_filter(get_object_vars($this)); |
|
163
|
|
|
} |
|
164
|
|
|
} |
|
165
|
|
|
|