fix not displayed project information

This commit is contained in:
ralf 2024-02-08 10:42:01 +02:00
parent a4ec5577a0
commit 5524c1fa15
2 changed files with 4 additions and 1 deletions

View File

@ -14,6 +14,7 @@ Following schema is used for JSON encoding of timesheets
* duration: integer in minutes
* quantity: double
* project: string
* pm_id: integer ID of ProjectManager app (readonly currently!)
* unitprice: double
* category: category object with a single(!) category-name e.g. `{"category name": true}`
* owner: string with either email or username or integer ID
@ -188,6 +189,7 @@ curl 'https://example.org/egroupware/groupdav.php/timesheet/140' -H "Accept: app
"duration": 60,
"quantity": 1,
"project": "2024-0001: Test Project",
"pm_id": 123,
"unitprice": 100.0,
"pricelist": 123,
"owner": "ralf@example.org",

View File

@ -52,7 +52,8 @@ class JsTimesheet extends Api\CalDAV\JsBase
'description' => $timesheet['description'],
'start' => self::UTCDateTime($timesheet['start'], true),
'duration' => (int)$timesheet['duration'],
'project' => $timesheet['project'],
'project' => $timesheet['project_blur'] ?? null,
'pm_id' => !empty($timesheet['pm_id']) ? (int)$timesheet['pm_id'] : null,
'quantity' => (double)$timesheet['quantity'],
'unitprice' => (double)$timesheet['unitprice'],
'category' => self::categories($timesheet['cat_id']),