1.18.1 - fix description pattern in title (#3179)
* bump version * add comment to customer/project/activity entity and collections api * improve title pattern usage
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
unreleased=true
|
unreleased=true
|
||||||
future-release=1.17
|
future-release=1.18
|
||||||
exclude-labels=duplicate,support,question,invalid,wontfix,release,waiting for feedback,documentation
|
exclude-labels=duplicate,support,question,invalid,wontfix,release,waiting for feedback,documentation
|
||||||
enhancement_labels=>enhancement,Enhancement,feature request,translation i18n,technical debt,documentation
|
enhancement_labels=>enhancement,Enhancement,feature request,translation i18n,technical debt,documentation
|
||||||
issues-wo-labels=false
|
issues-wo-labels=false
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ It is built with modern technologies such as [Symfony](https://github.com/symfon
|
|||||||
|
|
||||||
### Requirements
|
### Requirements
|
||||||
|
|
||||||
- PHP 7.3 or higher (PHP 8 supported)
|
- PHP 7.4 or higher (PHP 8 supported, PHP 8.1 does not support LDAP yet)
|
||||||
- MariaDB or MySQL
|
- MariaDB or MySQL
|
||||||
- A webserver and subdomain
|
- A webserver and subdomain
|
||||||
- PHP extensions: `gd`, `intl`, `json`, `mbstring`, `pdo`, `xsl`, `zip`
|
- PHP extensions: `gd`, `intl`, `json`, `mbstring`, `pdo`, `xsl`, `zip`
|
||||||
|
|||||||
@@ -5,10 +5,10 @@
|
|||||||
As announced in the [README](README.md) I only support the latest available release and master.
|
As announced in the [README](README.md) I only support the latest available release and master.
|
||||||
|
|
||||||
| Version | Supported |
|
| Version | Supported |
|
||||||
|---------| ------------------ |
|
|---------|--------------------|
|
||||||
| master | :white_check_mark: |
|
| master | :white_check_mark: |
|
||||||
| 1.17 | :white_check_mark: |
|
| 1.18 | :white_check_mark: |
|
||||||
| < 1.17 | :x: |
|
| < 1.18 | :x: |
|
||||||
|
|
||||||
## Reporting a Vulnerability
|
## Reporting a Vulnerability
|
||||||
|
|
||||||
@@ -20,5 +20,5 @@ Depending on the size of the required fixes, this might take a couple of hours o
|
|||||||
|
|
||||||
You can expect that your message will be answered ASAP.
|
You can expect that your message will be answered ASAP.
|
||||||
|
|
||||||
If your issue is valid and after I verified and fixed it, you will be mentioned in the release notes.
|
You will be mentioned in the release notes if your issue is valid and after it was fixed.
|
||||||
I am grateful for any (discrete) disclosure of vulnerabilities!
|
I am grateful for any (discrete) disclosure of vulnerabilities!
|
||||||
|
|||||||
@@ -224,15 +224,17 @@ export default class KimaiFormSelect extends KimaiPlugin {
|
|||||||
title = title.replace(new RegExp('{' + field + '}', 'g'), value ?? '');
|
title = title.replace(new RegExp('{' + field + '}', 'g'), value ?? '');
|
||||||
}
|
}
|
||||||
title = title.replace(/- \?-\?/, '');
|
title = title.replace(/- \?-\?/, '');
|
||||||
|
title = title.replace(/\r\n|\r|\n/g, ' ');
|
||||||
|
title = title.substr(0, 110);
|
||||||
|
|
||||||
const chars = '- ';
|
const chars = '- ';
|
||||||
let start = 0, end = title.length;
|
let start = 0, end = title.length;
|
||||||
|
|
||||||
while(start < end && chars.indexOf(title[start]) >= 0) {
|
while (start < end && chars.indexOf(title[start]) >= 0) {
|
||||||
++start;
|
++start;
|
||||||
}
|
}
|
||||||
|
|
||||||
while(end > start && chars.indexOf(title[end - 1]) >= 0) {
|
while (end > start && chars.indexOf(title[end - 1]) >= 0) {
|
||||||
--end;
|
--end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
2
public/build/app.30368b2e.js
Normal file
2
public/build/app.30368b2e.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -3,7 +3,7 @@
|
|||||||
"app": {
|
"app": {
|
||||||
"js": [
|
"js": [
|
||||||
"build/runtime.b8e7bb04.js",
|
"build/runtime.b8e7bb04.js",
|
||||||
"build/app.b91d3d99.js"
|
"build/app.30368b2e.js"
|
||||||
],
|
],
|
||||||
"css": [
|
"css": [
|
||||||
"build/app.3bc2b4d9.css"
|
"build/app.3bc2b4d9.css"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"build/app.css": "build/app.3bc2b4d9.css",
|
"build/app.css": "build/app.3bc2b4d9.css",
|
||||||
"build/app.js": "build/app.b91d3d99.js",
|
"build/app.js": "build/app.30368b2e.js",
|
||||||
"build/invoice.css": "build/invoice.ff32661a.css",
|
"build/invoice.css": "build/invoice.ff32661a.css",
|
||||||
"build/invoice.js": "build/invoice.19f36eca.js",
|
"build/invoice.js": "build/invoice.19f36eca.js",
|
||||||
"build/invoice-pdf.css": "build/invoice-pdf.9a7468ef.css",
|
"build/invoice-pdf.css": "build/invoice-pdf.9a7468ef.css",
|
||||||
|
|||||||
@@ -17,11 +17,11 @@ class Constants
|
|||||||
/**
|
/**
|
||||||
* The current release version
|
* The current release version
|
||||||
*/
|
*/
|
||||||
public const VERSION = '1.18';
|
public const VERSION = '1.18.1';
|
||||||
/**
|
/**
|
||||||
* The current release: major * 10000 + minor * 100 + patch
|
* The current release: major * 10000 + minor * 100 + patch
|
||||||
*/
|
*/
|
||||||
public const VERSION_ID = 11800;
|
public const VERSION_ID = 11801;
|
||||||
/**
|
/**
|
||||||
* The current release status, either "stable" or "dev"
|
* The current release status, either "stable" or "dev"
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ class Activity implements EntityWithMetaFields, EntityWithBudget
|
|||||||
* @var string|null
|
* @var string|null
|
||||||
*
|
*
|
||||||
* @Serializer\Expose()
|
* @Serializer\Expose()
|
||||||
* @Serializer\Groups({"Activity_Entity"})
|
* @Serializer\Groups({"Default"})
|
||||||
*
|
*
|
||||||
* @Exporter\Expose(label="label.comment")
|
* @Exporter\Expose(label="label.comment")
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ class Customer implements EntityWithMetaFields, EntityWithBudget
|
|||||||
* @var string|null
|
* @var string|null
|
||||||
*
|
*
|
||||||
* @Serializer\Expose()
|
* @Serializer\Expose()
|
||||||
* @Serializer\Groups({"Customer_Entity"})
|
* @Serializer\Groups({"Default"})
|
||||||
*
|
*
|
||||||
* @Exporter\Expose(label="label.comment")
|
* @Exporter\Expose(label="label.comment")
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ class Project implements EntityWithMetaFields, EntityWithBudget
|
|||||||
* @var string|null
|
* @var string|null
|
||||||
*
|
*
|
||||||
* @Serializer\Expose()
|
* @Serializer\Expose()
|
||||||
* @Serializer\Groups({"Project_Entity"})
|
* @Serializer\Groups({"Default"})
|
||||||
*
|
*
|
||||||
* @Exporter\Expose(label="label.comment")
|
* @Exporter\Expose(label="label.comment")
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ class ActivityType extends AbstractType
|
|||||||
{
|
{
|
||||||
$name = $this->getPattern();
|
$name = $this->getPattern();
|
||||||
$name = str_replace(self::PATTERN_NAME, $activity->getName(), $name);
|
$name = str_replace(self::PATTERN_NAME, $activity->getName(), $name);
|
||||||
$name = str_replace(self::PATTERN_COMMENT, $activity->getComment(), $name);
|
$name = str_replace(self::PATTERN_COMMENT, $activity->getComment() ?? '', $name);
|
||||||
|
|
||||||
$name = ltrim($name, self::SPACER);
|
$name = ltrim($name, self::SPACER);
|
||||||
$name = rtrim($name, self::SPACER);
|
$name = rtrim($name, self::SPACER);
|
||||||
@@ -66,7 +66,7 @@ class ActivityType extends AbstractType
|
|||||||
$name = $activity->getName();
|
$name = $activity->getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $name;
|
return substr($name, 0, 110);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -60,9 +60,9 @@ class CustomerType extends AbstractType
|
|||||||
{
|
{
|
||||||
$name = $this->getPattern();
|
$name = $this->getPattern();
|
||||||
$name = str_replace(self::PATTERN_NAME, $customer->getName(), $name);
|
$name = str_replace(self::PATTERN_NAME, $customer->getName(), $name);
|
||||||
$name = str_replace(self::PATTERN_COMMENT, $customer->getComment(), $name);
|
$name = str_replace(self::PATTERN_COMMENT, $customer->getComment() ?? '', $name);
|
||||||
$name = str_replace(self::PATTERN_NUMBER, $customer->getNumber(), $name);
|
$name = str_replace(self::PATTERN_NUMBER, $customer->getNumber() ?? '', $name);
|
||||||
$name = str_replace(self::PATTERN_COMPANY, $customer->getCompany() ?? $customer->getName(), $name);
|
$name = str_replace(self::PATTERN_COMPANY, $customer->getCompany() ?? '', $name);
|
||||||
|
|
||||||
$name = ltrim($name, self::SPACER);
|
$name = ltrim($name, self::SPACER);
|
||||||
$name = rtrim($name, self::SPACER);
|
$name = rtrim($name, self::SPACER);
|
||||||
@@ -71,7 +71,7 @@ class CustomerType extends AbstractType
|
|||||||
$name = $customer->getName();
|
$name = $customer->getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $name;
|
return substr($name, 0, 110);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getChoiceAttributes(Customer $customer, $key, $value): array
|
public function getChoiceAttributes(Customer $customer, $key, $value): array
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ class ProjectType extends AbstractType
|
|||||||
|
|
||||||
$name = $this->getPattern();
|
$name = $this->getPattern();
|
||||||
$name = str_replace(self::PATTERN_NAME, $project->getName(), $name);
|
$name = str_replace(self::PATTERN_NAME, $project->getName(), $name);
|
||||||
$name = str_replace(self::PATTERN_COMMENT, $project->getComment(), $name);
|
$name = str_replace(self::PATTERN_COMMENT, $project->getComment() ?? '', $name);
|
||||||
$name = str_replace(self::PATTERN_ORDERNUMBER, $project->getOrderNumber(), $name);
|
$name = str_replace(self::PATTERN_ORDERNUMBER, $project->getOrderNumber(), $name);
|
||||||
$name = str_replace(self::PATTERN_START, $start, $name);
|
$name = str_replace(self::PATTERN_START, $start, $name);
|
||||||
$name = str_replace(self::PATTERN_END, $end, $name);
|
$name = str_replace(self::PATTERN_END, $end, $name);
|
||||||
@@ -94,7 +94,7 @@ class ProjectType extends AbstractType
|
|||||||
$name = $project->getName();
|
$name = $project->getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $name;
|
return substr($name, 0, 110);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -376,6 +376,7 @@ abstract class APIControllerBaseTest extends ControllerBaseTest
|
|||||||
'visible' => 'bool',
|
'visible' => 'bool',
|
||||||
'color' => '@string',
|
'color' => '@string',
|
||||||
'number' => '@string',
|
'number' => '@string',
|
||||||
|
'comment' => '@string',
|
||||||
];
|
];
|
||||||
|
|
||||||
// if a list of customers is loaded
|
// if a list of customers is loaded
|
||||||
@@ -386,6 +387,7 @@ abstract class APIControllerBaseTest extends ControllerBaseTest
|
|||||||
'visible' => 'boolean',
|
'visible' => 'boolean',
|
||||||
'color' => '@string',
|
'color' => '@string',
|
||||||
'number' => '@string',
|
'number' => '@string',
|
||||||
|
'comment' => '@string',
|
||||||
'metaFields' => ['result' => 'array', 'type' => 'CustomerMeta'],
|
'metaFields' => ['result' => 'array', 'type' => 'CustomerMeta'],
|
||||||
'teams' => ['result' => 'array', 'type' => 'Team'],
|
'teams' => ['result' => 'array', 'type' => 'Team'],
|
||||||
'currency' => 'string', // since 1.10
|
'currency' => 'string', // since 1.10
|
||||||
@@ -427,6 +429,7 @@ abstract class APIControllerBaseTest extends ControllerBaseTest
|
|||||||
'visible' => 'bool',
|
'visible' => 'bool',
|
||||||
'color' => '@string',
|
'color' => '@string',
|
||||||
'customer' => 'int',
|
'customer' => 'int',
|
||||||
|
'comment' => '@string',
|
||||||
];
|
];
|
||||||
|
|
||||||
// if a project is embedded in an expanded collection (here timesheet)
|
// if a project is embedded in an expanded collection (here timesheet)
|
||||||
@@ -437,6 +440,7 @@ abstract class APIControllerBaseTest extends ControllerBaseTest
|
|||||||
'visible' => 'bool',
|
'visible' => 'bool',
|
||||||
'color' => '@string',
|
'color' => '@string',
|
||||||
'customer' => ['result' => 'object', 'type' => 'Customer'],
|
'customer' => ['result' => 'object', 'type' => 'Customer'],
|
||||||
|
'comment' => '@string',
|
||||||
];
|
];
|
||||||
|
|
||||||
// if a collection of projects is loaded
|
// if a collection of projects is loaded
|
||||||
@@ -452,6 +456,7 @@ abstract class APIControllerBaseTest extends ControllerBaseTest
|
|||||||
'start' => '@datetime',
|
'start' => '@datetime',
|
||||||
'end' => '@datetime',
|
'end' => '@datetime',
|
||||||
'teams' => ['result' => 'array', 'type' => 'Team'],
|
'teams' => ['result' => 'array', 'type' => 'Team'],
|
||||||
|
'comment' => '@string',
|
||||||
];
|
];
|
||||||
|
|
||||||
// if a project is explicitly loaded
|
// if a project is explicitly loaded
|
||||||
@@ -483,6 +488,7 @@ abstract class APIControllerBaseTest extends ControllerBaseTest
|
|||||||
'visible' => 'bool',
|
'visible' => 'bool',
|
||||||
'project' => '@int',
|
'project' => '@int',
|
||||||
'color' => '@string',
|
'color' => '@string',
|
||||||
|
'comment' => '@string',
|
||||||
];
|
];
|
||||||
|
|
||||||
case 'ActivityExpanded':
|
case 'ActivityExpanded':
|
||||||
@@ -492,6 +498,7 @@ abstract class APIControllerBaseTest extends ControllerBaseTest
|
|||||||
'visible' => 'bool',
|
'visible' => 'bool',
|
||||||
'project' => ['result' => 'object', 'type' => '@ProjectExpanded'],
|
'project' => ['result' => 'object', 'type' => '@ProjectExpanded'],
|
||||||
'color' => '@string',
|
'color' => '@string',
|
||||||
|
'comment' => '@string',
|
||||||
];
|
];
|
||||||
|
|
||||||
// collection of activities
|
// collection of activities
|
||||||
@@ -504,6 +511,7 @@ abstract class APIControllerBaseTest extends ControllerBaseTest
|
|||||||
'color' => '@string',
|
'color' => '@string',
|
||||||
'metaFields' => ['result' => 'array', 'type' => 'ProjectMeta'],
|
'metaFields' => ['result' => 'array', 'type' => 'ProjectMeta'],
|
||||||
'parentTitle' => '@string',
|
'parentTitle' => '@string',
|
||||||
|
'comment' => '@string',
|
||||||
'teams' => ['result' => 'array', 'type' => 'Team'],
|
'teams' => ['result' => 'array', 'type' => 'Team'],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user