Closed chri55w closed 8 years ago
@BradConnor had you noticed this at all? as you have 4 duplicates of the same timer from Thursday?
Yes – that was the day I was having all sorts of problems with the program!
@BradConnor Any idea what actions might have caused the duplication?
I was creating a new timer log of the same template type for the next day, but it was resetting the existing timer logs from the previous day and creating a duplicate. That’s activities, though, not timer types. Maybe I was trying to create a generic type then customising it for each activity. Sorry, can’t really remember the exact sequence
Issue seems to occur during the CreateTimeLog function, or at least is worsened by it in that where two EMPLOYEE_TIME_LOG_TEMPLATEs match on the first two columns any attempt to create a new TimeLog causes a new EMPLOYEE_TIME_LOG_TEMPLATE to be created.
Modified the EMPLOYEE_TIME_LOG TABLE to use a Unique constraint on the EMPLOYEE_REFNUM and TIME_LOG_TEMPLATE_ID columns and changed the function creating new Time Log Templates to prevent the user while showing a useful error message
Possibly fixed but requires further testing
issue has not appeared since testing began, appears to be fixed
Duplicate entries found in the EMPLOYEE_TIME_LOG_TEMPLATE table - constraint on the two columns EMPLOYEE_REFNUM and TIME_LOG_TEMPLATE_ID required?
All duplicates contain the same names too however the LAST_USED changes with each one