@@ -54,6 +54,7 @@ class PluginFormcreatorTarget_Actor extends CommonDBChild implements PluginFormc
54
54
const ACTOR_TYPE_QUESTION_ACTORS = 9 ;
55
55
const ACTOR_TYPE_GROUP_FROM_OBJECT = 10 ;
56
56
const ACTOR_TYPE_TECH_GROUP_FROM_OBJECT = 11 ;
57
+ CONST ACTOR_TYPE_AUTHORS_SUPERVISOR = 12 ;
57
58
58
59
const ACTOR_ROLE_REQUESTER = 1 ;
59
60
const ACTOR_ROLE_OBSERVER = 2 ;
@@ -73,6 +74,7 @@ static function getEnumActorType() {
73
74
self ::ACTOR_TYPE_SUPPLIER => __ ('Specific supplier ' , 'formcreator ' ),
74
75
self ::ACTOR_TYPE_QUESTION_SUPPLIER => __ ('Supplier from the question ' , 'formcreator ' ),
75
76
self ::ACTOR_TYPE_QUESTION_ACTORS => __ ('Actors from the question ' , 'formcreator ' ),
77
+ self ::ACTOR_TYPE_AUTHORS_SUPERVISOR => __ ('Form author \'s supervisor ' , 'formcreator ' ),
76
78
];
77
79
}
78
80
@@ -126,6 +128,7 @@ public static function import(PluginFormcreatorLinker $linker, $input = [], $con
126
128
case self ::ACTOR_TYPE_QUESTION_SUPPLIER :
127
129
case self ::ACTOR_TYPE_GROUP_FROM_OBJECT :
128
130
case self ::ACTOR_TYPE_TECH_GROUP_FROM_OBJECT :
131
+ /** @var PluginFormcreatorQuestion $question */
129
132
$ question = $ linker ->getObject ($ input ['actor_value ' ], PluginFormcreatorQuestion::class);
130
133
if ($ question === false ) {
131
134
$ linker ->postpone ($ input [$ idKey ], $ item ->getType (), $ input , $ containerId );
@@ -135,6 +138,7 @@ public static function import(PluginFormcreatorLinker $linker, $input = [], $con
135
138
break ;
136
139
137
140
case self ::ACTOR_TYPE_PERSON :
141
+ case self ::ACTOR_TYPE_AUTHORS_SUPERVISOR :
138
142
$ user = new User ;
139
143
$ users_id = plugin_formcreator_getFromDBByField ($ user , 'name ' , $ input ['actor_value ' ]);
140
144
if ($ users_id === false ) {
@@ -221,6 +225,7 @@ public function export(bool $remove_uuid = false) : array {
221
225
}
222
226
break ;
223
227
case self ::ACTOR_TYPE_PERSON :
228
+ case self ::ACTOR_TYPE_AUTHORS_SUPERVISOR :
224
229
$ user = new User ;
225
230
if ($ user ->getFromDB ($ target_actor ['actor_value ' ])) {
226
231
$ target_actor ['actor_value ' ] = $ user ->fields ['name ' ];
0 commit comments