Logging Service
This service is used to start and stop the time recording and to administrate the recording settings.
GetActiveTimeEntry
This method returns the current active time entry. If no time recording is active, it returns NULL.
ActiveTimeEntryDto GetActiveTimeEntry(
out TpFault fault,
TpAuthentication authentication);
Needed Permission | logging@access | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
return value | The active time entry or NULL, if the time tracking has not been started. |
SearchActiveTimeEntries
This method searches for active time-entries with the given filter. The permission of the authenticated user will be considered. Only time entries of the user profiles that the user is allowed to access will be returned.
List<ActiveTimeEntryDto> SearchActiveTimeEntries(
out TpFault fault,
TpAuthentication authentication,
ActiveTimeEntrySearchDto search);
Needed Permission | timeEntries@access / core@switchIdentity | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
search | The filter that is used to search the time entries | |
Return value | Collection with the found time entries |
StartWorkTimeLogging
This method starts the work time recording.
ActiveTimeEntryDto StartWorkTimeLogging(
out TpFault fault,
TpAuthentication authentication,
Guid projectId,
Guid? taskId,
Guid? customerId,
string description,
DateTime? startTime,
out List<TimeEntryDto> todayEntries);
Needed Permission | startTime == null ? logging@access : logging@manage | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
projectId | The id of the project that is used to start the time recording | |
taskId | The id of the task that is used for the time recording | |
customerId | The id of the customer that is used for the time recording | |
description | The description that will be used for the time recording | |
startTime | The start time of the time recording. Regularly this should be NULL; otherwise a higher user-permission is needed. | |
todayEntries | Out | Collection of all entries of the current day. |
Return value | The current time entry that has been started by the method. |
StartBreakTimeLogging
This method starts a new break time recording. It’s important that this can only be done if an active time recording is already in place. A break can only be started as a part of the current work time recording.
ActiveTimeEntryDto StartBreakTimeLogging(
out TpFault fault,
TpAuthentication authentication);
Needed Permission | logging@access | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
return value | The current time entry that has been modified by the method. |
EndLogging
This method ends the current recording and commits the recorded time entry for the user.
ActiveTimeEntryDto EndLogging(
out TpFault fault,
TpAuthentication authentication,
DateTime? endTime,
out TimeSpan? committedWorkTime,
out List<TimeEntryDto> todayEntries);
Needed Permission | endTime == null ? logging@access : logging@manage | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
endTime | The end time of the time recording. Regularly this should be NULL; otherwise a higher user-permission is needed. | |
commitedWorkTime | Out | The committed work time |
todayEntries | Out | Collection of all entries of the current day. |
Return value | The current time entry that has been committed by the method. |
CancelLogging
This method cancels the current work time recording. This can be necessary if the current work entry has not been ended correctly.
void CancelLogging(
out TpFault fault,
TpAuthentication authentication);
Needed Permission | logging@access | |
---|---|---|
Name | Modifier | Description |
Fault | Out | Contains the error if an exception occurs. |
Authentication | User authentication |
LockSession
This method locks the current work time recording. This should be done e.g. when the screensaver is activated. This locking does not mean an instant break of the current work time recording. How the lock is handled will be defined with the locking settings.
void LockSession(
out TpFault fault,
TpAuthentication authentication,
DateTime? lockTime);
Needed Permission | logging@access | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
lockTime | Time that is used as the current lock time. If this parameter is null, the time at the server will be taken. |
UnlockSession
This method unlocks the previously locked time entry. When unlocking the time entry, TimePunch analyses the lock time and decides how to handle the current work time recording.
ActiveTimeEntryDto UnlockSession(
out TpFault fault,
TpAuthentication authentication,
DateTime? unlockTime);
Needed Permission | logging@access | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
unlockTime | Time that is used as the current unlock time. If this parameter is null, the time at the server will be taken. | |
Return Value | The unlocked time entry or NULL, if no time entry is active after unlocking the session. |
SaveLoggingSettings
This method stores the recording settings for the TimePunch profile.
void SaveLoggingSettings(
out TpFault fault,
TpAuthentication authentication,
LoggingSettingsDto settingsDto);
Needed Permission | logging@settings | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
settingsDto | The amended Logging Settings that shall be stored. |
SearchLoggingSettings
This method returns the logging settings for the given search object.
List<LoggingSettingsDto> SearchLoggingSettings(
out TpFault fault,
TpAuthentication authentication,
UserSearchDto userSearchDto);
Needed Permission | logging@access | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
userSearchDto | Search object containing the user search data. The coverage will be applied accordingly to the user authentication. | |
Return value | All user logging settings. |
GetLoggingContext
This method is the central place to load all data that are necessary in order to get an overview of the complete time recording status.
LoggingContextDto GetLoggingContext(
out TpFault fault,
TpAuthentication authentication);
Needed Permission | logging@access | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
Return value | All data regarding the current time entry logging. |
ValidateAndSaveActiveTimeEntry
This method is used to change the currently active time entry. It can be used to change the project, switch start and end time or to amend the project.
ActiveTimeEntryDto ValidateAndSaveActiveTimeEntry(
out TpFault fault,
TpAuthentication authentication,
ActiveTimeEntryDto activeTimeEntry);
Needed Permission | logging@manage | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
activeTimeEntry | The active time entry that shall be stored | |
Return value | The currently active time entry after the amendments |
ValidateAndSaveRestrictedActiveTimeEntry
This method is used to amend the currently active time entry. Because the method needs less permission one can only change the description and the project or task.
ActiveTimeEntryDto ValidateAndSaveRestrictedActiveTimeEntry(
out TpFault fault,
TpAuthentication authentication,
TimeEntryRestrictedSaveDto activeTimeEntry);
Needed Permission | logging@access | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
activeTimeEntry | The active time entry that shall be stored | |
Return value | The currently active time entry after the amendments |