diff --git a/application/src/main/data/upgrade/3.4.4/schema_update.sql b/application/src/main/data/upgrade/3.4.4/schema_update.sql index fc0f7d7b8e..6860adc612 100644 --- a/application/src/main/data/upgrade/3.4.4/schema_update.sql +++ b/application/src/main/data/upgrade/3.4.4/schema_update.sql @@ -193,15 +193,15 @@ COALESCE(CASE WHEN a.originator_type = 0 THEN (select title from tenant where id WHEN a.originator_type = 18 THEN (select name from edge where id = a.originator_id) END , 'Deleted') originator_name, COALESCE(CASE WHEN a.originator_type = 0 THEN (select title from tenant where id = a.originator_id) - WHEN a.originator_type = 1 THEN (select COALESCE(title, email) from customer where id = a.originator_id) + WHEN a.originator_type = 1 THEN (select COALESCE(NULLIF(title, ''), email) from customer where id = a.originator_id) WHEN a.originator_type = 2 THEN (select email from tb_user where id = a.originator_id) WHEN a.originator_type = 3 THEN (select title from dashboard where id = a.originator_id) - WHEN a.originator_type = 4 THEN (select COALESCE(label, name) from asset where id = a.originator_id) - WHEN a.originator_type = 5 THEN (select COALESCE(label, name) from device where id = a.originator_id) + WHEN a.originator_type = 4 THEN (select COALESCE(NULLIF(label, ''), name) from asset where id = a.originator_id) + WHEN a.originator_type = 5 THEN (select COALESCE(NULLIF(label, ''), name) from device where id = a.originator_id) WHEN a.originator_type = 9 THEN (select name from entity_view where id = a.originator_id) WHEN a.originator_type = 13 THEN (select name from device_profile where id = a.originator_id) WHEN a.originator_type = 14 THEN (select name from asset_profile where id = a.originator_id) - WHEN a.originator_type = 18 THEN (select COALESCE(label, name) from edge where id = a.originator_id) END + WHEN a.originator_type = 18 THEN (select COALESCE(NULLIF(label, ''), name) from edge where id = a.originator_id) END , 'Deleted') as originator_label, u.first_name as assignee_first_name, u.last_name as assignee_last_name, u.email as assignee_email FROM alarm a diff --git a/dao/src/main/resources/sql/schema-entities.sql b/dao/src/main/resources/sql/schema-entities.sql index 7d47138bab..4e60c7105e 100644 --- a/dao/src/main/resources/sql/schema-entities.sql +++ b/dao/src/main/resources/sql/schema-entities.sql @@ -874,15 +874,15 @@ COALESCE(CASE WHEN a.originator_type = 0 THEN (select title from tenant where id WHEN a.originator_type = 18 THEN (select name from edge where id = a.originator_id) END , 'Deleted') originator_name, COALESCE(CASE WHEN a.originator_type = 0 THEN (select title from tenant where id = a.originator_id) - WHEN a.originator_type = 1 THEN (select COALESCE(title, email) from customer where id = a.originator_id) + WHEN a.originator_type = 1 THEN (select COALESCE(NULLIF(title, ''), email) from customer where id = a.originator_id) WHEN a.originator_type = 2 THEN (select email from tb_user where id = a.originator_id) WHEN a.originator_type = 3 THEN (select title from dashboard where id = a.originator_id) - WHEN a.originator_type = 4 THEN (select COALESCE(label, name) from asset where id = a.originator_id) - WHEN a.originator_type = 5 THEN (select COALESCE(label, name) from device where id = a.originator_id) + WHEN a.originator_type = 4 THEN (select COALESCE(NULLIF(label, ''), name) from asset where id = a.originator_id) + WHEN a.originator_type = 5 THEN (select COALESCE(NULLIF(label, ''), name) from device where id = a.originator_id) WHEN a.originator_type = 9 THEN (select name from entity_view where id = a.originator_id) WHEN a.originator_type = 13 THEN (select name from device_profile where id = a.originator_id) WHEN a.originator_type = 14 THEN (select name from asset_profile where id = a.originator_id) - WHEN a.originator_type = 18 THEN (select COALESCE(label, name) from edge where id = a.originator_id) END + WHEN a.originator_type = 18 THEN (select COALESCE(NULLIF(label, ''), name) from edge where id = a.originator_id) END , 'Deleted') as originator_label, u.first_name as assignee_first_name, u.last_name as assignee_last_name, u.email as assignee_email FROM alarm a diff --git a/msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/pages/CustomerPageHelper.java b/msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/pages/CustomerPageHelper.java index 030bf630cb..ba90361dc8 100644 --- a/msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/pages/CustomerPageHelper.java +++ b/msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/pages/CustomerPageHelper.java @@ -141,6 +141,7 @@ public class CustomerPageHelper extends CustomerPageElements { assignedField().click(); setDashboard(); listOfEntity().get(0).click(); + assignedField().sendKeys(Keys.ESCAPE); submitAssignedBtn().click(); } diff --git a/msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/pages/SideBarMenuViewElements.java b/msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/pages/SideBarMenuViewElements.java index 1291af855f..ab8ee9bf55 100644 --- a/msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/pages/SideBarMenuViewElements.java +++ b/msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/pages/SideBarMenuViewElements.java @@ -27,7 +27,7 @@ public class SideBarMenuViewElements extends AbstractBasePage { private static final String RULE_CHAINS_BTN = "//mat-toolbar//a[@href='/ruleChains']"; private static final String CUSTOMER_BTN = "//mat-toolbar//a[@href='/customers']"; private static final String DASHBOARD_BTN = "//mat-toolbar//a[@href='/dashboards']"; - private static final String PROFILES_BTN = "//mat-toolbar//a[@href='/profiles']"; + private static final String PROFILES_BTN = "//mat-toolbar//mat-icon[text()='badge']/ancestor::tb-menu-toggle"; private static final String DEVICE_PROFILE_BTN = "//mat-toolbar//a[@href='/profiles/deviceProfiles']"; private static final String ASSET_PROFILE_BTN = "//mat-toolbar//a[@href='/profiles/assetProfiles']";