Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F457767
DifferentialTestPlanCommitMessageField.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
DifferentialTestPlanCommitMessageField.php
View Options
<?php
final
class
DifferentialTestPlanCommitMessageField
extends
DifferentialCommitMessageField
{
const
FIELDKEY
=
'testPlan'
;
public
function
getFieldName
()
{
return
pht
(
'Test Plan'
);
}
public
function
getFieldOrder
()
{
return
3000
;
}
public
function
getFieldAliases
()
{
return
array
(
'Testplan'
,
'Tested'
,
'Tests'
,
);
}
public
function
isFieldEnabled
()
{
return
$this
->
isCustomFieldEnabled
(
'differential:test-plan'
);
}
public
function
validateFieldValue
(
$value
)
{
$is_required
=
PhabricatorEnv
::
getEnvConfig
(
'differential.require-test-plan-field'
);
if
(
$is_required
&&
!
strlen
(
$value
))
{
$this
->
raiseValidationException
(
pht
(
'You must provide a test plan. Describe the actions you performed '
.
'to verify the behavior of this change.'
));
}
}
public
function
readFieldValueFromObject
(
DifferentialRevision
$revision
)
{
return
$revision
->
getTestPlan
();
}
public
function
getFieldTransactions
(
$value
)
{
return
array
(
array
(
'type'
=>
DifferentialRevisionTestPlanTransaction
::
EDITKEY
,
'value'
=>
$value
,
),
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 5, 10:20 AM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
71432
Default Alt Text
DifferentialTestPlanCommitMessageField.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment