Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F481856
PhabricatorProjectTriggerManiphestStatusRule.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1019 B
Referenced Files
None
Subscribers
None
PhabricatorProjectTriggerManiphestStatusRule.php
View Options
<?php
final
class
PhabricatorProjectTriggerManiphestStatusRule
extends
PhabricatorProjectTriggerRule
{
const
TRIGGERTYPE
=
'task.status'
;
public
function
getDescription
()
{
$value
=
$this
->
getValue
();
return
pht
(
'Changes status to "%s".'
,
ManiphestTaskStatus
::
getTaskStatusName
(
$value
));
}
protected
function
assertValidRuleValue
(
$value
)
{
if
(!
is_string
(
$value
))
{
throw
new
Exception
(
pht
(
'Status rule value should be a string, but is not (value is "%s").'
,
phutil_describe_type
(
$value
)));
}
$map
=
ManiphestTaskStatus
::
getTaskStatusMap
();
if
(!
isset
(
$map
[
$value
]))
{
throw
new
Exception
(
pht
(
'Rule value ("%s") is not a valid task status.'
,
$value
));
}
}
protected
function
newDropTransactions
(
$object
,
$value
)
{
return
array
(
$this
->
newTransaction
()
->
setTransactionType
(
ManiphestTaskStatusTransaction
::
TRANSACTIONTYPE
)
->
setNewValue
(
$value
),
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Wed, May 7, 1:19 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
89315
Default Alt Text
PhabricatorProjectTriggerManiphestStatusRule.php (1019 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment