Skip to content

Commit

Permalink
Fixes regexp for search timesheets by tag (#978)
Browse files Browse the repository at this point in the history
  • Loading branch information
tobybatch authored and kevinpapst committed Jul 22, 2019
1 parent a0e8aa3 commit dae8866
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/API/TimesheetController.php
Expand Up @@ -108,7 +108,7 @@ protected function getTrackingMode(): TrackingModeInterface
* @Rest\QueryParam(name="activity", requirements="\d+", strict=true, nullable=true, description="Activity ID to filter timesheets")
* @Rest\QueryParam(name="page", requirements="\d+", strict=true, nullable=true, description="The page to display, renders a 404 if not found (default: 1)")
* @Rest\QueryParam(name="size", requirements="\d+", strict=true, nullable=true, description="The amount of entries for each page (default: 50)")
* @Rest\QueryParam(name="tags", requirements="[a-zA-Z0-9 -,]+", strict=true, nullable=true, description="The name of tags which are in the datasets")
* @Rest\QueryParam(name="tags", requirements="[a-zA-Z0-9 \-,]+", strict=true, nullable=true, description="The name of tags which are in the datasets")
* @Rest\QueryParam(name="orderBy", requirements="id|begin|end|rate", strict=true, nullable=true, description="The field by which results will be ordered. Allowed values: id, begin, end, rate (default: begin)")
* @Rest\QueryParam(name="order", requirements="ASC|DESC", strict=true, nullable=true, description="The result order. Allowed values: ASC, DESC (default: DESC)")
* @Rest\QueryParam(name="begin", requirements=@Constraints\DateTime(format="Y-m-d\TH:i:s"), strict=true, nullable=true, description="Only records after this date will be included (format: HTML5)")
Expand Down
2 changes: 1 addition & 1 deletion tests/API/TimesheetControllerTest.php
Expand Up @@ -677,7 +677,7 @@ public function testGetCollectionWithTags()
$this->assertEquals(10, count($result));
$this->assertDefaultStructure($result[0], false);

$query = ['tags' => 'Nothing'];
$query = ['tags' => 'Nothing-2-see,here'];
$this->assertAccessIsGranted($client, '/api/timesheets', 'GET', $query);
$result = json_decode($client->getResponse()->getContent(), true);

Expand Down

0 comments on commit dae8866

Please sign in to comment.