File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -621,7 +621,8 @@ protected function getTargetTemplate(array $data): int {
621621 'FROM ' => ITILCategory::getTable (),
622622 'WHERE ' => ['id ' => $ data ['itilcategories_id ' ]]
623623 ]);
624- if ($ row = $ rows ->current ()) { // assign change template according to resulting change category
624+ if ($ row = $ rows ->current ()) {
625+ // assign change template according to resulting change category
625626 return $ row [$ targetTemplateFk ];
626627 }
627628 }
Original file line number Diff line number Diff line change @@ -783,14 +783,15 @@ protected function getTargetTemplate(array $data): int {
783783 'FROM ' => ITILCategory::getTable (),
784784 'WHERE ' => ['id ' => $ data ['itilcategories_id ' ]]
785785 ]);
786- if ($ row = $ rows ->current ()) { // assign ticket template according to resulting ticket category and ticket type
786+ if ($ row = $ rows ->current ()) {
787+ // assign ticket template according to resulting ticket category and ticket type
787788 return ($ data ['type ' ] == Ticket::INCIDENT_TYPE
788789 ? $ row ["{$ targetTemplateFk }_incident " ]
789790 : $ row ["{$ targetTemplateFk }_demand " ]);
790791 }
791792 }
792793
793- return $ this ->fields [' tickettemplates_id ' ] ?? 0 ;
794+ return $ this ->fields [$ targetTemplateFk ] ?? 0 ;
794795 }
795796
796797 /**
You can’t perform that action at this time.
0 commit comments