Commit 1eb56010 by Kunj Gupta

Fixed - App is crashing because of removed HRCase option from Home Screen.

parent 216ba3ae
...@@ -33,6 +33,7 @@ import com.vsoft.servicenow.utils.CatalogueLog; ...@@ -33,6 +33,7 @@ import com.vsoft.servicenow.utils.CatalogueLog;
import com.vsoft.servicenow.utils.Constants; import com.vsoft.servicenow.utils.Constants;
import com.vsoft.servicenow.db.DBConstants; import com.vsoft.servicenow.db.DBConstants;
import com.vsoft.servicenow.utils.PrefManager; import com.vsoft.servicenow.utils.PrefManager;
import com.vsoft.servicenow.utils.Util;
import org.json.JSONException; import org.json.JSONException;
import org.json.JSONObject; import org.json.JSONObject;
...@@ -97,22 +98,28 @@ public class SyncService extends IntentService { ...@@ -97,22 +98,28 @@ public class SyncService extends IntentService {
if(Constants.DEBUG) CatalogueLog.d("startSync: result of syncing attachment "+i+": "+result); if(Constants.DEBUG) CatalogueLog.d("startSync: result of syncing attachment "+i+": "+result);
} }
if(Util.isHrCaseEnabled()) {
/*Then we will work on dirty variable form*/ /*Then we will work on dirty variable form*/
List<HRCaseItemInput> hrCaseItemInputList = HRCaseItemInputManager.getDirtyItemInput(); List<HRCaseItemInput> hrCaseItemInputList = HRCaseItemInputManager.getDirtyItemInput();
if(Constants.DEBUG) CatalogueLog.d("startSync: HRCase form to sync: "+hrCaseItemInputList.size()); if (Constants.DEBUG)
CatalogueLog.d("startSync: HRCase form to sync: " + hrCaseItemInputList.size());
for (int i = 0; i < hrCaseItemInputList.size(); i++) { for (int i = 0; i < hrCaseItemInputList.size(); i++) {
HRCaseItemInput hrCaseItemInput = hrCaseItemInputList.get(i); HRCaseItemInput hrCaseItemInput = hrCaseItemInputList.get(i);
result = syncHRCaseVariableForm(hrCaseItemInput); result = syncHRCaseVariableForm(hrCaseItemInput);
if(Constants.DEBUG) CatalogueLog.d("startSync: result of syncing hrCaseItemInput "+i+": "+result); if (Constants.DEBUG)
CatalogueLog.d("startSync: result of syncing hrCaseItemInput " + i + ": " + result);
} }
/*Then we will work on dirty HRCase attachment*/ /*Then we will work on dirty HRCase attachment*/
List<HRCaseAttachment> hrCaseAttachmentList = HRCaseAttachmentManager.getDirtyHRCaseAttachment(); List<HRCaseAttachment> hrCaseAttachmentList = HRCaseAttachmentManager.getDirtyHRCaseAttachment();
if(Constants.DEBUG) CatalogueLog.d("startSync: HRCaseAttachment to sync: "+hrCaseAttachmentList.size()); if (Constants.DEBUG)
CatalogueLog.d("startSync: HRCaseAttachment to sync: " + hrCaseAttachmentList.size());
for (int i = 0; i < hrCaseAttachmentList.size(); i++) { for (int i = 0; i < hrCaseAttachmentList.size(); i++) {
HRCaseAttachment hrCaseAttachment = hrCaseAttachmentList.get(i); HRCaseAttachment hrCaseAttachment = hrCaseAttachmentList.get(i);
result = syncHRCaseAttachment(hrCaseAttachment); result = syncHRCaseAttachment(hrCaseAttachment);
if(Constants.DEBUG) CatalogueLog.d("startSync: result of syncing hrCaseAttachment "+i+": "+result); if (Constants.DEBUG)
CatalogueLog.d("startSync: result of syncing hrCaseAttachment " + i + ": " + result);
}
} }
/*Then we will work on dirty incident form*/ /*Then we will work on dirty incident form*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment