Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

N°824 - Allow OQL JOIN on object ON EventNotification #642

Open
wants to merge 5 commits into
base: support/3.2
Choose a base branch
from

Conversation

accognet
Copy link
Contributor

@accognet accognet commented Apr 5, 2024

Add a new object_class field in EventNotification to be used in a future version of iTop

@accognet accognet added the enhancement New feature or request label Apr 5, 2024
@accognet accognet self-assigned this Apr 5, 2024
@accognet accognet changed the title Feature/824 add object class on event notification N°824 - Allow OQL JOIN on object_id ON EventNotification Apr 5, 2024
@accognet accognet changed the title N°824 - Allow OQL JOIN on object_id ON EventNotification N°824 - Allow OQL JOIN on object ON EventNotification Apr 5, 2024
@Molkobain
Copy link
Member

Support PRs review:

  • Anne-Cath will ask Vincent if we want to display the "Notifications" tab even when no trigger but existing notifications (code to be done)
  • Data migration during setup has been done (mind to reset "previous version " to 3.2 instead of 3.3)

@Molkobain Molkobain added the internal Work made by Combodo label Apr 15, 2024
@accognet accognet changed the base branch from develop to support/3.2 April 16, 2024 12:25
@@ -228,6 +228,54 @@ public static function AfterDatabaseCreation(Config $oConfiguration, $sPreviousV
SetupLog::Info("... default triggers/action successfully created for $iClassesWithLogCount classes.");
}
}

//N°824 - Fill object_class in EventNotification from the Triggers target_class
if (version_compare($sPreviousVersion, '3.3.0', '<')) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mind to restore to 3.2.0

}

foreach ($aData as $sKey => $sTargetClass) {

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change


$sRepair = "UPDATE `$sTableToSet` JOIN `$sTableToRead` ON `$sTableToSet`.`$sColumnObjectId` = `$sTableToRead`.`$sObjectPrimaryKey` SET `$sTableToSet`.`$sColumnToSet` = `$sTableToRead`.`$sColumnToRead` WHERE `$sTableToSet`.`$sColumnTriggerId` = '".$sKey."' AND `$sTableToSet`.`$sColumnToSet` = ''";
} else {

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request internal Work made by Combodo
Projects
Status: Pending support PRs review
2 participants