@@ -16,7 +16,8 @@ final class ManiphestTask extends ManiphestDAO
16
16
PhabricatorSpacesInterface,
17
17
PhabricatorConduitResultInterface,
18
18
PhabricatorFulltextInterface,
19
- DoorkeeperBridgedObjectInterface {
19
+ DoorkeeperBridgedObjectInterface,
20
+ PhabricatorEditEngineSubtypeInterface {
20
21
21
22
const MARKUP_FIELD_DESCRIPTION = 'markup:desc ' ;
22
23
@@ -40,6 +41,7 @@ final class ManiphestTask extends ManiphestDAO
40
41
protected $ bridgedObjectPHID ;
41
42
protected $ properties = array ();
42
43
protected $ points ;
44
+ protected $ subtype ;
43
45
44
46
private $ subscriberPHIDs = self ::ATTACHABLE ;
45
47
private $ groupByProjectPHID = self ::ATTACHABLE ;
@@ -63,6 +65,7 @@ public static function initializeNewTask(PhabricatorUser $actor) {
63
65
->setViewPolicy ($ view_policy )
64
66
->setEditPolicy ($ edit_policy )
65
67
->setSpacePHID ($ actor ->getDefaultSpacePHID ())
68
+ ->setSubtype (PhabricatorEditEngineSubtype::SUBTYPE_DEFAULT )
66
69
->attachProjectPHIDs (array ())
67
70
->attachSubscriberPHIDs (array ());
68
71
}
@@ -86,6 +89,7 @@ protected function getConfiguration() {
86
89
'subpriority ' => 'double ' ,
87
90
'points ' => 'double? ' ,
88
91
'bridgedObjectPHID ' => 'phid? ' ,
92
+ 'subtype ' => 'text64 ' ,
89
93
),
90
94
self ::CONFIG_KEY_SCHEMA => array (
91
95
'key_phid ' => null ,
@@ -124,6 +128,9 @@ protected function getConfiguration() {
124
128
'columns ' => array ('bridgedObjectPHID ' ),
125
129
'unique ' => true ,
126
130
),
131
+ 'key_subtype ' => array (
132
+ 'columns ' => array ('subtype ' ),
133
+ ),
127
134
),
128
135
) + parent ::getConfiguration ();
129
136
}
@@ -474,6 +481,10 @@ public function getFieldSpecificationsForConduit() {
474
481
->setKey ('points ' )
475
482
->setType ('points ' )
476
483
->setDescription (pht ('Point value of the task. ' )),
484
+ id (new PhabricatorConduitSearchFieldSpecification ())
485
+ ->setKey ('subtype ' )
486
+ ->setType ('string ' )
487
+ ->setDescription (pht ('Subtype of the task. ' )),
477
488
);
478
489
}
479
490
@@ -501,6 +512,7 @@ public function getFieldValuesForConduit() {
501
512
'status ' => $ status_info ,
502
513
'priority ' => $ priority_info ,
503
514
'points ' => $ this ->getPoints (),
515
+ 'subtype ' => $ this ->getSubtype (),
504
516
);
505
517
}
506
518
@@ -533,4 +545,16 @@ public function attachBridgedObject(
533
545
return $ this ;
534
546
}
535
547
548
+
549
+ /* -( PhabricatorEditEngineSubtypeInterface )------------------------------ */
550
+
551
+
552
+ public function getEditEngineSubtype () {
553
+ return $ this ->getSubtype ();
554
+ }
555
+
556
+ public function setEditEngineSubtype ($ value ) {
557
+ return $ this ->setSubtype ($ value );
558
+ }
559
+
536
560
}
0 commit comments