Add fix for multiple device app activity details retrieval

fixes https://roadmap.entgra.net/issues/10260
Co-authored-by: Oshani Silva <oshani@entgra.io>
Co-committed-by: Oshani Silva <oshani@entgra.io>
devicenamelink
Oshani Silva 4 months ago committed by Lasantha Dharmakeerthi
parent 61a9114956
commit 05ce0dd0b4

@ -1445,13 +1445,13 @@ public class GenericSubscriptionDAOImpl extends AbstractDAOImpl implements Subsc
+ "AR.PACKAGE_NAME, " + "AR.PACKAGE_NAME, "
+ "AR.VERSION, " + "AR.VERSION, "
+ "DS.SUBSCRIBED_BY, " + "DS.SUBSCRIBED_BY, "
+ "DS.STATUS, "
+ "DS.ACTION_TRIGGERED_FROM " + "DS.ACTION_TRIGGERED_FROM "
+ "FROM AP_APP_SUB_OP_MAPPING SOP " + "FROM AP_APP_SUB_OP_MAPPING SOP "
+ "JOIN AP_DEVICE_SUBSCRIPTION DS ON SOP.AP_DEVICE_SUBSCRIPTION_ID = DS.ID " + "JOIN AP_DEVICE_SUBSCRIPTION DS ON SOP.AP_DEVICE_SUBSCRIPTION_ID = DS.ID "
+ "JOIN AP_APP_RELEASE AR ON DS.AP_APP_RELEASE_ID = AR.ID " + "JOIN AP_APP_RELEASE AR ON DS.AP_APP_RELEASE_ID = AR.ID "
+ "JOIN AP_APP AP ON AP.ID = AR.AP_APP_ID " + "JOIN AP_APP AP ON AP.ID = AR.AP_APP_ID "
+ " WHERE SOP.OPERATION_ID = ? AND SOP.TENANT_ID = ?"; + "WHERE SOP.OPERATION_ID = ? AND SOP.TENANT_ID = ? "
+ "LIMIT 1";
Connection conn = this.getDBConnection(); Connection conn = this.getDBConnection();
try (PreparedStatement stmt = conn.prepareStatement(sql)) { try (PreparedStatement stmt = conn.prepareStatement(sql)) {

@ -383,7 +383,6 @@ public class DAOUtil {
activity.setAppType(rs.getString("TYPE")); activity.setAppType(rs.getString("TYPE"));
activity.setUsername(rs.getString("SUBSCRIBED_BY")); activity.setUsername(rs.getString("SUBSCRIBED_BY"));
activity.setPackageName(rs.getString("PACKAGE_NAME")); activity.setPackageName(rs.getString("PACKAGE_NAME"));
activity.setStatus(rs.getString("STATUS"));
activity.setVersion(rs.getString("VERSION")); activity.setVersion(rs.getString("VERSION"));
activity.setTriggeredBy(rs.getString("ACTION_TRIGGERED_FROM")); activity.setTriggeredBy(rs.getString("ACTION_TRIGGERED_FROM"));
activities.add(activity); activities.add(activity);

@ -175,7 +175,6 @@ public class ActivityProviderServiceImpl implements ActivityInfoProviderService
activity.setUsername(appActivity.getUsername()); activity.setUsername(appActivity.getUsername());
activity.setPackageName(appActivity.getPackageName()); activity.setPackageName(appActivity.getPackageName());
activity.setAppName(appActivity.getAppName()); activity.setAppName(appActivity.getAppName());
activity.setStatus(appActivity.getStatus());
activity.setAppType(appActivity.getAppType()); activity.setAppType(appActivity.getAppType());
activity.setVersion(appActivity.getVersion()); activity.setVersion(appActivity.getVersion());
activity.setTriggeredBy(appActivity.getTriggeredBy()); activity.setTriggeredBy(appActivity.getTriggeredBy());

Loading…
Cancel
Save