[ADD] tests and fix for https://code.launchpad.net/~agilebg/hr-timesheet/fix-hr_attendance_analysis-bracket/+merge/221278