File tree Expand file tree Collapse file tree 2 files changed +22
-12
lines changed Expand file tree Collapse file tree 2 files changed +22
-12
lines changed Original file line number Diff line number Diff line change @@ -352,18 +352,6 @@ public function buildParams($rand = null) {
352
352
}
353
353
}
354
354
355
- $ emptyItem = new $ itemtype ();
356
- $ emptyItem ->getEmpty ();
357
- if (isset ($ emptyItem ->fields ['serial ' ])) {
358
- $ dparams ['displaywith ' ][] = 'serial ' ;
359
- }
360
- if (isset ($ emptyItem ->fields ['otherserial ' ])) {
361
- $ dparams ['displaywith ' ][] = 'otherserial ' ;
362
- }
363
- if ($ itemtype === Ticket::class && !array_search ('id ' , $ dparams ['displaywith ' ])) {
364
- $ dparams ['displaywith ' ][] = 'id ' ;
365
- }
366
-
367
355
return $ dparams ;
368
356
}
369
357
Original file line number Diff line number Diff line change @@ -134,6 +134,28 @@ public function getAvailableValues(): array {
134
134
return [];
135
135
}
136
136
137
+ public function buildParams ($ rand = null ) {
138
+ $ dparams = parent ::buildParams ($ rand );
139
+ $ itemtype = $ this ->getSubItemtype ();
140
+
141
+ $ emptyItem = new $ itemtype ();
142
+ $ emptyItem ->getEmpty ();
143
+ if (isset ($ emptyItem ->fields ['contact ' ])) {
144
+ $ dparams ['displaywith ' ][] = 'contact ' ;
145
+ }
146
+ if (isset ($ emptyItem ->fields ['serial ' ])) {
147
+ $ dparams ['displaywith ' ][] = 'serial ' ;
148
+ }
149
+ if (isset ($ emptyItem ->fields ['otherserial ' ])) {
150
+ $ dparams ['displaywith ' ][] = 'otherserial ' ;
151
+ }
152
+ if ($ itemtype === Ticket::class && !array_search ('id ' , $ dparams ['displaywith ' ])) {
153
+ $ dparams ['displaywith ' ][] = 'id ' ;
154
+ }
155
+
156
+ return $ dparams ;
157
+ }
158
+
137
159
public function equals ($ value ): bool {
138
160
$ value = html_entity_decode ($ value );
139
161
$ itemtype = $ this ->getSubItemtype ();
You can’t perform that action at this time.
0 commit comments