How do date fields (standard and custom) behave in Termination portlet?
Employee Central: Employment Details
Reproducing the Issue
If we first select values for standard date fields (example: Payroll End Date, Benefits End Date, Last Date Worked, etc) and then select Termination Date, the previously selected values are retained. But if we select Termination Date for the second time, all the date fields get refreshed and get populated by the same value as the Termination Date value.
For custom date fields in Termination portlet, the behavior is a bit different. When we select Termination date for the first time, the behavior is exactly same as it is for standard date fields. But when we select Termination Date for the second time, the custom date fields just get refreshed (they become blank) and they don't get populated with Termination Date value.
We observe the behavior because Termination Date field is the driving field in Termination portlet.
The logic why first time the fields are not refreshed but they are refreshed second time is explained below.
Every time Termination Date is changed, UI backs a call to server to get the latest data. Before making the call, fields which are changed just before updating the Termination Date will be sent to server, so that those will be part of latest data. Once the dialog is refreshed, UI doesn't have knowledge of previous updated fields. So, when the Termination Date field is changed for the second time, nothing will be sent to server (because there was no change in the date fields between first time selection and second time selection of Termination Date) and hence previous modified fields data is lost.
separation date lost_data , KBA , LOD-SF-EC-EMP , Employment Information , LOD-SF-EC , Employee Central , Problem