Merge remote-tracking branch 'origin/release/12.2' into dev

pull/11299/head
Oliver Günther 2 years ago
commit c657a3efc5
No known key found for this signature in database
GPG Key ID: 88872239EB414F99
  1. 31
      db/migrate/20220818074150_fix_invalid_journals.rb
  2. 29
      docs/release-notes/12-2-4/README.md
  3. 7
      docs/release-notes/README.md
  4. 3
      docs/user-guide/work-packages/work-packages-faq/README.md
  5. 3
      frontend/.eslintrc.js
  6. 11
      frontend/src/app/shared/components/grids/widgets/custom-text/custom-text-edit-field.service.ts

@ -0,0 +1,31 @@
class FixInvalidJournals < ActiveRecord::Migration[7.0]
def up
get_broken_journals.each do |journable_type, relation|
next unless relation.any?
# rubocop:disable Rails/Output
puts "Cleaning up broken journals on #{journable_type}"
# rubocop:enable Rails/Output
relation.destroy_all
end
end
def down
# nothing to do
end
def get_broken_journals
Journal
.pluck('DISTINCT(journable_type)')
.compact
.to_h do |journable_type|
journal_class = journable_type.constantize.journal_class
relation = Journal
.where(journable_type:)
.where.not(data_type: journal_class.to_s)
[journable_type, relation]
end
end
end

@ -0,0 +1,29 @@
---
title: OpenProject 12.2.4
sidebar_navigation:
title: 12.2.4
release_version: 12.2.4
release_date: 2022-09-15
---
# OpenProject 12.2.4
Release date: 2022-09-15
We released [OpenProject 12.2.4](https://community.openproject.com/versions/1599).
The release contains several bug fixes and we recommend updating to the newest version.
<!--more-->
#### Bug fixes and changes
- Fixed: Remaining hours sum not well formed \[[#43833](https://community.openproject.com/wp/43833)\]
- Fixed: Destroy journals with invalid data_type associations \[[#44132](https://community.openproject.com/wp/44132)\]
- Fixed: Internal error / Illegal instruction error \[[#44155](https://community.openproject.com/wp/44155)\]
- Fixed: Dragging images to CKEditor on Grid custom texts not working with direct upload \[[#44156](https://community.openproject.com/wp/44156)\]
#### Contributions
A big thanks to community members for reporting bugs and helping us identifying and providing fixes.
Special thanks for reporting and finding bugs go to
Nico Aymet

@ -14,6 +14,13 @@ Stay up to date and get an overview of the new features included in the releases
<!--- New release notes are generated below. Do not remove comment. -->
<!--- RELEASE MARKER -->
## 12.2.4
Release date: 2022-09-15
[Release Notes](12-2-4/)
## 12.2.3
Release date: 2022-09-12

@ -192,8 +192,7 @@ In the details view of the work package: Click on **More** (button with three do
### Can I group tasks into folders?
There are no folders for work packages. I suggest either setting all work packages belonging together as children of the same parent work package (e.g. a Phase) or to create multiple projects for different topics. Alternatively you could use the [work package categories](../../projects/project-settings/work-package-categories) or a custom field to group work packages. You can also indent hierarchy for for tasks to associate it with another work package like a phase, then they are relatete to the Pahase in the gantt chart.
There are no folders for work packages. To group work packages, such as tasks, you can use the [filter and grouping options](../work-package-table-configuration/#work-package-table-configuration) and [save the filters](../work-package-table-configuration/#save-work-package-views). You can also define all related work packages as children of the same parent work package (e.g. a phase). you can indent the hierarchy for work packages in the work packages list (with a right mouse click -> *Indent hierarchy*) to add them as children to another work package, for example a phase. This will then also be displayed in the Gantt chart. Alternatively, you can use the [work package categories](../../projects/project-settings/work-package-categories/#manage-work-package-categories) or a custom field to filter and group work packages. Also, you can create multiple projects to group different topics.
## Custom fields

@ -87,6 +87,9 @@ module.exports = {
// no param reassignment is a pain when trying to set props on elements
"no-param-reassign": "off",
// destructuring doesn't always look better, only when object/array destructuring
"prefer-destructuring": "off",
// No void at all collides with `@typescript-eslint/no-floating-promises` which wants us to handle each promise.
// Until we do that, `void` is a good way to explicitly mark unhandled promises.
"no-void": ["error", { allowAsStatement: true }],

@ -10,6 +10,7 @@ import { SchemaCacheService } from 'core-app/core/schemas/schema-cache.service';
import { UploadFile } from 'core-app/core/file-upload/op-file-upload.service';
import { ICKEditorContext } from 'core-app/shared/components/editor/components/ckeditor/ckeditor.types';
import { HalResource } from 'core-app/features/hal/resources/hal-resource';
import { GridResource } from 'core-app/features/hal/resources/grid-resource';
@Injectable()
export class CustomTextEditFieldService extends EditFieldHandler {
@ -138,7 +139,8 @@ export class CustomTextEditFieldService extends EditFieldHandler {
*/
private initializeChangeset(value:GridWidgetResource) {
const schemaHref = 'customtext-schema';
const resourceSource = {
const grid:GridResource = value.grid;
const resourceSource:HalSource = {
text: value.options.text,
getEditorContext: () => ({
type: 'full',
@ -146,13 +148,18 @@ export class CustomTextEditFieldService extends EditFieldHandler {
} as ICKEditorContext),
canAddAttachments: value.grid.canAddAttachments as boolean,
_links: {
attachments: (value.grid as HalResource).attachments as { href?:string },
attachments: grid.attachments as { href?:string },
schema: {
href: schemaHref,
},
},
};
if (grid.prepareAttachment as { href?:string }) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access
resourceSource._links.prepareAttachment = grid.prepareAttachment;
}
const resource = this.halResource.createHalResource(resourceSource, true);
const schemaSource = {

Loading…
Cancel
Save