release 0.8 (#567)

This commit is contained in:
Kevin Papst
2019-02-19 11:03:11 +01:00
committed by GitHub
parent b4f1cae323
commit 47b7046743
40 changed files with 446 additions and 341 deletions

View File

@@ -83,11 +83,11 @@ class ActivityController extends BaseApiController
$query->setOrderBy($orderBy);
}
if (null !== ($globals = $paramFetcher->get('globals'))) {
if (null !== $paramFetcher->get('globals')) {
$query->setGlobalsOnly(true);
}
if ('false' === ($globalsFirst = $paramFetcher->get('globalsFirst'))) {
if ('false' === $paramFetcher->get('globalsFirst')) {
$query->setOrderGlobalsFirst(false);
}

View File

@@ -25,6 +25,8 @@ use Symfony\Component\Console\Style\SymfonyStyle;
* You should convert all timesheet records that were saved with Kimai 2 directly, but NOT the ones migrated from Kimai v1.
*
* Please read https://github.com/kevinpapst/kimai2/pull/372 to find out more!
*
* @codeCoverageIgnore
*/
class ConvertTimezoneCommand extends Command
{

View File

@@ -35,6 +35,8 @@ use Symfony\Component\Validator\Validator\ValidatorInterface;
/**
* Command used to import data from a Kimai v1 installation.
* Getting help in improving this script would be fantastic, it currently only handles the most basic use-cases.
*
* @codeCoverageIgnore
*/
class KimaiImporterCommand extends Command
{
@@ -962,7 +964,6 @@ class KimaiImporterCommand extends Command
// ----------------------- unknown user, damned missing data integrity in Kimai v1 -----------------------
if (!isset($this->users[$oldRecord['userID']])) {
$tempUserName = uniqid();
$tempPassword = uniqid() . uniqid();

View File

@@ -21,7 +21,7 @@ class Constants
/**
* The current release version
*/
public const VERSION = '0.7';
public const VERSION = '0.8';
/**
* The release name, will only change for new major version
*/

View File

@@ -74,5 +74,4 @@ class TimezoneSubscriber implements EventSubscriberInterface
return ($user instanceof User);
}
}

View File

@@ -9,6 +9,7 @@
namespace App\Repository;
use App\Entity\Activity;
use App\Entity\Timesheet;
use App\Entity\User;
use App\Model\Statistic\Month;
@@ -364,8 +365,7 @@ class TimesheetRepository extends AbstractRepository
->setParameter('activity', $query->getActivity());
}
// TODO if activity is an int, this will fail
if (null === $query->getActivity() || null === $query->getActivity()->getProject()) {
if (null === $query->getActivity() || ($query->getActivity() instanceof Activity && null === $query->getActivity()->getProject())) {
if (null !== $query->getProject()) {
$qb->andWhere('t.project = :project')
->setParameter('project', $query->getProject());