Project

General

Profile

Actions

Bug #10683

open

System Update Policy is not working

Added by Arshana Atapattu 8 months ago. Updated 2 months ago.

Status:
New
Priority:
High
Start date:
04/09/2024
Due date:
09/09/2024 (28 days late)
% Done:

0%

Estimated time:
Device Type:
Component:
Type:
Android

Description

Environment details
6.0.3 server

Prerequisites
none

Steps
create a policy with "System Update Policy"

Description
System Update Policy has 3 categories.
Automatic, postpone, window

the Automatic policy can be created, but the other two types cannot.

Issue with postpone policy is it sending the wrong type(it is sending "type":"postponed" [3]).
this should be "postpone"
permalink: https://repository.entgra.net/proprietary/emm-proprietary-plugins/src/commit/e6182b05a57fe5dc1a6201130e5fc0cb83a3d876/components/platform-plugins/android-plugin/io.entgra.proprietary.uem.platform.android.core/src/main/java/io/entgra/proprietary/uem/platform/android/core/util/Constants.java#L35
refer [7]

Issue with window policy is with the payload,
for 12AM it shows as 1440. which is in minutes. this need to be divide by 60 to convert it into hours and minutes.
1440 minutes is equivalent to 24h. if the 12Am is showed as 0 it may work.
Note: if the policy is start without 12Am it is working.

Error log when trying to create postpone [1]
browser error log when trying to create postpone [2]
payload create postpone [3]

Error log when trying to create window [4]
browser error log when trying to create window [5]
payload create window [6]

Result

[1]
[2024-02-09 09:52:05,100] ERROR - AndroidPolicyPayloadValidator System Update Policy validation failed due to {"type":"Type is must be windowed or auto or postponed"}
[2024-02-09 09:52:05,101] ERROR - PolicyManagementServiceImpl Policy feature/s validation failed.

[2] {
"code": 400,
"data": "Policy feature/s validation failed. Features : [io.entgra.device.mgt.core.policy.mgt.common.ProfileFeature@21cbac94]",
"status": 0
}

[3] {"policyName":"System policy update new","description":"System policy update new","compliance":"enforce","ownershipType":null,"active":true,"policyType":"GENERAL","profile":{"profileName":"System policy update new","deviceType":"android","profileFeaturesList":[{"featureCode":"SYSTEM_UPDATE_POLICY","deviceType":"android","content":{"type":"postponed"},"correctiveActions":[]}]},"roles":["ANY"],"users":[]}

[4]
[2024-02-09 09:47:52,328] ERROR - AndroidPolicyPayloadValidator System Update Policy validation failed due to {"startTime":"Start time is a value between 0 and 1440. Excluding 1440 and including 0","endTime":"End time is a value between 0 and 1440. Excluding 1440 and including 0"}
[2024-02-09 09:47:52,329] ERROR - PolicyManagementServiceImpl Policy feature/s validation failed.

[5] {
"code": 400,
"data": "Policy feature/s validation failed. Features : [io.entgra.device.mgt.core.policy.mgt.common.ProfileFeature@3344fda7]",
"status": 0
}

[6] {"policyName":"System policy update new","description":"System policy update new","compliance":"enforce","ownershipType":null,"active":true,"policyType":"GENERAL","profile":{"profileName":"System policy update new","deviceType":"android","profileFeaturesList":[{"featureCode":"SYSTEM_UPDATE_POLICY","deviceType":"android","content":{"type":"window","startTime":"1440","endTime":"1440"},"correctiveActions":[]}]},"roles":["ANY"],"users":[]}

[7]


Files

Actions #1

Updated by Arshana Atapattu 8 months ago

  • Description updated (diff)
Actions #3

Updated by Viranga Gunarathna 8 months ago

  • Project changed from product-uem 6.1.0 GA to Backlog
Actions #4

Updated by Arshana Atapattu 2 months ago

  • Project changed from Backlog to product-uem 6.3.0 GA
Actions #5

Updated by Sandaru Daminda 2 months ago

  • Due date set to 09/09/2024
  • Assignee changed from Sandaru Daminda to Kavin Prathaban
  • Start date changed from 09/02/2024 to 04/09/2024
Actions

Also available in: Atom PDF