Commit 058af795ef8a831e8238e8af35c6086d2dadc8a6
1 parent
f2dd7d80
Exists in
master
Ajustes para poder colocar unidade no esquema do servico
Showing
4 changed files
with
10 additions
and
12 deletions
Show diff stats
Kernel/Modules/NewTicketWizard.pm
... | ... | @@ -320,7 +320,6 @@ sub GetForm { |
320 | 320 | Options => $fields, |
321 | 321 | UserID => $Self->{ConfigObject}->Get('CustomerPanelUserID') |
322 | 322 | ); |
323 | - ( $schema, $fields ) = $Self->{TicketWizard}->ReplaceOTRSDynamicFields( Schema => $schema, Options => $fields ); | |
324 | 323 | |
325 | 324 | if ( !$Param{ServiceForm} ) { |
326 | 325 | $schema =~ s/CF_SCHEMA//g; |
... | ... | @@ -343,11 +342,12 @@ sub GetForm { |
343 | 342 | } |
344 | 343 | } |
345 | 344 | |
345 | + # Incluir campos dinâmicos no replace | |
346 | + ( $schema, $fields ) = $Self->{TicketWizard}->ReplaceOTRSDynamicFields( Schema => $schema, Options => $fields ); | |
347 | + | |
346 | 348 | if ( $Param{"QueueID"} ) { |
347 | 349 | $schema = $schema . ",\n\"QueueID\": {\n\"type\": \"string\",\n\"default\": \"" . $Param{"QueueID"} . "\"}"; |
348 | 350 | $fields = $fields . ",\n\"QueueID\": {\n\"type\": \"hidden\"\n}"; |
349 | - print STDERR "schema = \n\n" . $schema . "\n\n fields = \n\n" . $fields; | |
350 | - | |
351 | 351 | } |
352 | 352 | |
353 | 353 | return ( $schema, $fields, $introduction ); | ... | ... |
Kernel/Modules/NewTicketWizardPublic.pm
... | ... | @@ -227,8 +227,7 @@ sub GetForm { |
227 | 227 | Options => $fields, |
228 | 228 | UserID => $Self->{DefaultUserID} |
229 | 229 | ); |
230 | - ( $schema, $fields ) = $Self->{TicketWizard}->ReplaceOTRSDynamicFields( Schema => $schema, Options => $fields ); | |
231 | - | |
230 | + | |
232 | 231 | if ( !$Param{ServiceForm} ) { |
233 | 232 | $schema =~ s/CF_SCHEMA//g; |
234 | 233 | $fields =~ s/CF_FORM//g; |
... | ... | @@ -250,10 +249,12 @@ sub GetForm { |
250 | 249 | } |
251 | 250 | } |
252 | 251 | |
252 | + # Incluir campos dinâmicos no replace | |
253 | + ( $schema, $fields ) = $Self->{TicketWizard}->ReplaceOTRSDynamicFields( Schema => $schema, Options => $fields ); | |
254 | + | |
253 | 255 | if ($Param{"QueueID"}) { |
254 | 256 | $schema = $schema . ",\n\"QueueID\": {\n\"type\": \"string\",\n\"default\": \"" . $Param{"QueueID"} . "\"}"; |
255 | 257 | $fields = $fields . ",\n\"QueueID\": {\n\"type\": \"hidden\"\n}"; |
256 | - print STDERR "schema = \n\n" . $schema . "\n\n fields = \n\n" . $fields; | |
257 | 258 | } |
258 | 259 | |
259 | 260 | return ( $schema, $fields, $introduction ); |
... | ... | @@ -367,8 +368,7 @@ sub CreateTicket { |
367 | 368 | ServiceID => $Self->{ParamObject}->GetParam( Param => "service" ), |
368 | 369 | TypeID => $Self->{ParamObject}->GetParam( Param => "type" ), |
369 | 370 | CustomerID => $Self->GetUserIDFromEmail( $Self->{ParamObject}->GetParam( Param => "email" ) ), |
370 | - | |
371 | - #CustomerUser => $Self->{UserLogin}, | |
371 | + CustomerUser => $Self->GetUserIDFromEmail( $Self->{ParamObject}->GetParam( Param => "email" ) ), | |
372 | 372 | OwnerID => $Self->{DefaultUserID}, |
373 | 373 | UserID => $Self->{DefaultUserID}, |
374 | 374 | ); | ... | ... |
Kernel/System/TicketWizard.pm
... | ... | @@ -175,14 +175,12 @@ sub ReplaceOTRSDynamicFields { |
175 | 175 | } |
176 | 176 | } |
177 | 177 | |
178 | - #Debug("schema", $schema); | |
179 | - #Debug("options", $options); | |
180 | 178 | return ( $schema, $options ); |
181 | 179 | } |
182 | 180 | |
183 | 181 | sub Debug { |
184 | 182 | my ( $id, $value ) = @_; |
185 | - ###print STDERR "\n\n $id =" . Dumper($value) . "\n"; | |
183 | + print STDERR "\n\n $id =" . Dumper($value) . "\n"; | |
186 | 184 | } |
187 | 185 | |
188 | 186 | sub GetDynamicFieldValues { | ... | ... |
NewTicketWizard.sopm