Project

General

Profile

Bug #10683

Updated by Arshana Atapattu 8 months ago

*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] 
 !Screenshot%20from%202024-02-09%2015-38-06.png! 

Back