Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F78643897
PhabricatorProjectMilestoneTransaction.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Aug 22, 03:43
Size
814 B
Mime Type
text/x-php
Expires
Sat, Aug 24, 03:43 (2 d)
Engine
blob
Format
Raw Data
Handle
20053335
Attached To
rPH Phabricator
PhabricatorProjectMilestoneTransaction.php
View Options
<?php
final
class
PhabricatorProjectMilestoneTransaction
extends
PhabricatorProjectTypeTransaction
{
const
TRANSACTIONTYPE
=
'project:milestone'
;
public
function
generateOldValue
(
$object
)
{
return
null
;
}
public
function
applyInternalEffects
(
$object
,
$value
)
{
$parent_phid
=
$value
;
$project
=
id
(
new
PhabricatorProjectQuery
())
->
setViewer
(
$this
->
getActor
())
->
withPHIDs
(
array
(
$parent_phid
))
->
requireCapabilities
(
array
(
PhabricatorPolicyCapability
::
CAN_VIEW
,
PhabricatorPolicyCapability
::
CAN_EDIT
,
))
->
executeOne
();
$object
->
attachParentProject
(
$project
);
$number
=
$object
->
getParentProject
()->
loadNextMilestoneNumber
();
$object
->
setMilestoneNumber
(
$number
);
$object
->
setParentProjectPHID
(
$value
);
}
}
Event Timeline
Log In to Comment