|
|
@@ -171,7 +171,18 @@ jQuery(document).ready(function () {
|
|
|
set k.`path`=coalesce(i.`idx_PATH`, '?');
|
|
|
update `PROBLEMS` pr left join `_project_path_idx` i on(i.`ID`=pr.`ID_PROJECT`)
|
|
|
set pr.`ID_PROJECT_path`=coalesce(i.`idx_PATH`, '?');
|
|
|
- END ;
|
|
|
+
|
|
|
+ update `CRM_UI_MSGS`
|
|
|
+ set `A_STATUS`='OFF_HARD'
|
|
|
+ , `actionExecutedTime`=NOW()
|
|
|
+ , `A_RECORD_UPDATE_DATE`=NOW()
|
|
|
+ , `A_RECORD_UPDATE_AUTHOR`='update_zasob_path_idx_rec'
|
|
|
+ where `A_STATUS`='WAITING'
|
|
|
+ and `app_className`='FixProjectPath'
|
|
|
+ and `msg`='Update all paths'
|
|
|
+ and `uiTargetType`='default_db_table'
|
|
|
+ and `uiTargetName`='IN7_MK_BAZA_DYSTRYBUCJI';
|
|
|
+ END
|
|
|
";
|
|
|
$sqlList['RemoveTrigger_BeforeInsertProject'] = "DROP TRIGGER IF EXISTS `_IN7_MK_BAZA_DYSTRYBUCJI_tree_INSERT`";
|
|
|
$sqlList['CreateTrigger_BeforeInsertProject'] = "
|
|
|
@@ -268,6 +279,24 @@ jQuery(document).ready(function () {
|
|
|
IF NEW.`P_ID`!=OLD.`P_ID` THEN
|
|
|
-- throw warning to update all pathes in `IN7_MK_BAZA_DYSTRYBUCJI` with path under current?
|
|
|
IF (select count(1) from `IN7_MK_BAZA_DYSTRYBUCJI` p where p.`P_ID`=NEW.ID) > 0 THEN
|
|
|
+ IF (select count(1) from `CRM_UI_MSGS` where `app_className`='FixProjectPath'
|
|
|
+ and `msg`='Update all paths'
|
|
|
+ and `uiTargetType`='default_db_table'
|
|
|
+ and `uiTargetName`='IN7_MK_BAZA_DYSTRYBUCJI'
|
|
|
+ and `A_STATUS`='WAITING'
|
|
|
+ ) = 0 THEN
|
|
|
+ INSERT INTO `CRM_UI_MSGS` (`ID`
|
|
|
+ , `app_className`, `msg`, `msgType`
|
|
|
+ , `uiTargetType`, `uiTargetName`
|
|
|
+ , `userTargetType`
|
|
|
+ , `A_RECORD_CREATE_DATE`, `A_RECORD_CREATE_AUTHOR`)
|
|
|
+ VALUES (NULL
|
|
|
+ , 'FixProjectPath', 'Update all paths', 'danger'
|
|
|
+ , 'default_db_table', 'IN7_MK_BAZA_DYSTRYBUCJI'
|
|
|
+ , 'everyone'
|
|
|
+ , NOW(), NEW.A_RECORD_UPDATE_AUTHOR
|
|
|
+ );
|
|
|
+ END IF;
|
|
|
UPDATE `P5-MSG:Route_FixProjectPath:WARNING: Update all paths` SET x=1;
|
|
|
END IF;
|
|
|
END IF;
|
|
|
@@ -379,6 +408,27 @@ jQuery(document).ready(function () {
|
|
|
return $msg;
|
|
|
}
|
|
|
|
|
|
+ public function parseMessageFromMsgsSystem($msg) {
|
|
|
+ switch ($msg) {
|
|
|
+ case 'Update all paths': {
|
|
|
+ $msg = "Zaktualizuj ścieżki projektów";
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return $msg;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function runByMessageFromMsgsSystem($msg, &$execNotes) {
|
|
|
+ switch ($msg) {
|
|
|
+ case 'Update all paths': {
|
|
|
+ $execNotes .= 'call procedure... ';
|
|
|
+ $this->_callProcedure();
|
|
|
+ $execNotes .= ' done';
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/**
|