Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Merge branch 'release/13.4' into dev

Christophe Bliard1ae177c2a85c
diff --cc .github/workflows/docker.yml
index 7a014e6b9d5,ae67f7e8d16..7ffa1dd391b
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@@ -21,9 -21,43 +21,43 @@@ env
REGISTRY_IMAGE: openproject/community
jobs:
+ extract_version:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Extract version
+ id: extract_version
+ run: |
+ if [[ ${{ github.event_name }} == 'push' ]]; then
+ TAG_REF=${GITHUB_REF#refs/tags/}
+ CHECKOUT_REF=$GITHUB_REF
+ elif [[ ${{ github.event_name }} == 'schedule' ]]; then
+ TAG_REF=dev
+ CHECKOUT_REF=refs/heads/dev
+ elif [[ ${{ github.event_name }} == 'workflow_dispatch' ]]; then
+ TAG_REF=${{ inputs.tag }}
+ CHECKOUT_REF=${{ inputs.tag }}
+ else
+ echo "Unsupported event"
+ exit 1
+ fi
+
+ if [ -z "$TAG_REF" ] || [ -z "$CHECKOUT_REF" ]; then
+ echo "No TAG_REF or CHECKOUT_REF set. Aborting"
+ exit 1
+ fi
+
+ VERSION=${TAG_REF#v}
+ echo "Version: $VERSION"
+ echo "version=$VERSION" >> "$GITHUB_OUTPUT"
+ echo "checkout_ref=$CHECKOUT_REF" >> "$GITHUB_OUTPUT"
+ outputs:
+ version: ${{ steps.extract_version.outputs.version }}
+ checkout_ref: ${{ steps.extract_version.outputs.checkout_ref }}
build:
+ needs:
+ - extract_version
if: github.repository == 'opf/openproject'
- runs-on: [ self-hosted, aws, ubuntu22, x64, 2XL ]
+ runs-on: runs-on,runner=8cpu-linux,family=m7i+m7a,run-id=${{ github.run_id }}
strategy:
matrix:
include:
@@@ -45,23 -79,10 +79,23 @@@
run: |
if [[ ${{ github.event_name }} == 'push' ]]; then
TAG_REF=${GITHUB_REF#refs/tags/}
+ CHECKOUT_REF=$GITHUB_REF
+ elif [[ ${{ github.event_name }} == 'schedule' ]]; then
+ TAG_REF=dev
+ CHECKOUT_REF=refs/heads/dev
elif [[ ${{ github.event_name }} == 'workflow_dispatch' ]]; then
TAG_REF=${{ inputs.tag }}
+ CHECKOUT_REF=${{ inputs.tag }}
+ else
+ echo "Unsupported event"
+ exit 1
+ fi
+
+ if [ -z "$TAG_REF" ] || [ -z "$CHECKOUT_REF" ]; then
+ echo "No TAG_REF or CHECKOUT_REF set. Aborting"
+ exit 1
fi
-
+
VERSION=${TAG_REF#v}
echo "Version: $VERSION"
echo "::set-output name=version::$VERSION"
diff --cc config/constants/settings/definition.rb
index 28df4a724e1,7bc12878aa7..306827d022d
--- a/config/constants/settings/definition.rb
+++ b/config/constants/settings/definition.rb
@@@ -769,8 -742,22 +769,22 @@@ module Setting
allowed: (0..),
default: 3
},
+ httpx_operation_timeout: {
+ description: '',
+ format: :float,
+ writable: false,
+ allowed: (0..),
+ default: 10
+ },
+ httpx_request_timeout: {
+ description: '',
+ format: :float,
+ writable: false,
+ allowed: (0..),
+ default: 10
+ },
httpx_read_timeout: {
- description: '',
+ description: "",
format: :float,
writable: false,
allowed: (0..),
diff --cc spec/models/queries/projects/factory_spec.rb
index bea1ddad631,4e3eb604f38..e43930ea664
--- a/spec/models/queries/projects/factory_spec.rb
+++ b/spec/models/queries/projects/factory_spec.rb
@@@ -65,22 -83,22 +83,22 @@@ RSpec.describe Queries::Projects::Facto
.to be_a(Queries::Projects::ProjectQuery)
end
- it 'has a name' do
+ it "has a name" do
expect(find.name)
- .to eql(I18n.t('projects.lists.active'))
+ .to eql(I18n.t("projects.lists.active"))
end
- it 'has a filter for active projects' do
+ it "has a filter for active projects" do
expect(find.filters.map { |filter| [filter.field, filter.operator, filter.values] })
- .to eq([[:active, '=', ['t']]])
+ .to eq([[:active, "=", ["t"]]])
end
- it 'is ordered by lft asc' do
+ it "is ordered by lft asc" do
expect(find.orders.map { |order| [order.attribute, order.direction] })
- .to eq([['lft', :asc]])
+ .to eq([["lft", :asc]])
end
- it "has the enabled project columns columns as selects" do
+ it "has the enabled_project_columns columns as selects" do
expect(find.selects.map(&:attribute))
.to eq(Setting.enabled_projects_columns.map(&:to_sym))
end
@@@ -105,22 -127,22 +127,22 @@@
.to be_a(Queries::Projects::ProjectQuery)
end
- it 'has a name' do
+ it "has a name" do
expect(find.name)
- .to eql(I18n.t('projects.lists.active'))
+ .to eql(I18n.t("projects.lists.active"))
end
- it 'has a filter for active projects' do
+ it "has a filter for active projects" do
expect(find.filters.map { |filter| [filter.field, filter.operator, filter.values] })
- .to eq([[:active, '=', ['t']]])
+ .to eq([[:active, "=", ["t"]]])
end
- it 'is ordered by lft asc' do
+ it "is ordered by lft asc" do
expect(find.orders.map { |order| [order.attribute, order.direction] })
- .to eq([['lft', :asc]])
+ .to eq([["lft", :asc]])
end
- it "has the enabled project columns columns as selects" do
- it 'has the enabled_project_columns columns as selects' do
++ it "has the enabled_project_columns columns as selects" do
expect(find.selects.map(&:attribute))
.to eq(Setting.enabled_projects_columns.map(&:to_sym))
end
@@@ -134,22 -156,22 +156,22 @@@
.to be_a(Queries::Projects::ProjectQuery)
end
- it 'has a name' do
+ it "has a name" do
expect(find.name)
- .to eql(I18n.t('projects.lists.my'))
+ .to eql(I18n.t("projects.lists.my"))
end
- it 'has a filter for projects the user is a member of' do
+ it "has a filter for projects the user is a member of" do
expect(find.filters.map { |filter| [filter.field, filter.operator, filter.values] })
- .to eq([[:member_of, '=', ['t']]])
+ .to eq([[:member_of, "=", ["t"]]])
end
- it 'is ordered by lft asc' do
+ it "is ordered by lft asc" do
expect(find.orders.map { |order| [order.attribute, order.direction] })
- .to eq([['lft', :asc]])
+ .to eq([["lft", :asc]])
end
- it "has the enabled project columns columns as selects" do
- it 'has the enabled_project_columns columns as selects' do
++ it "has the enabled_project_columns columns as selects" do
expect(find.selects.map(&:attribute))
.to eq(Setting.enabled_projects_columns.map(&:to_sym))
end
@@@ -163,22 -185,22 +185,22 @@@
.to be_a(Queries::Projects::ProjectQuery)
end
- it 'has a name' do
+ it "has a name" do
expect(find.name)
- .to eql(I18n.t('projects.lists.archived'))
+ .to eql(I18n.t("projects.lists.archived"))
end
- it 'has a filter for archived projects' do
+ it "has a filter for archived projects" do
expect(find.filters.map { |filter| [filter.field, filter.operator, filter.values] })
- .to eq([[:active, '=', ['f']]])
+ .to eq([[:active, "=", ["f"]]])
end
- it 'is ordered by lft asc' do
+ it "is ordered by lft asc" do
expect(find.orders.map { |order| [order.attribute, order.direction] })
- .to eq([['lft', :asc]])
+ .to eq([["lft", :asc]])
end
- it "has the enabled project columns columns as selects" do
- it 'has the enabled_project_columns columns as selects' do
++ it "has the enabled_project_columns columns as selects" do
expect(find.selects.map(&:attribute))
.to eq(Setting.enabled_projects_columns.map(&:to_sym))
end
@@@ -199,15 -221,15 +221,15 @@@
it 'has a filter for projects that are "on track"' do
expect(find.filters.map { |filter| [filter.field, filter.operator, filter.values] })
- .to eq([[:project_status_code, '=', [Project.status_codes[:on_track].to_s]]])
+ .to eq([[:project_status_code, "=", [Project.status_codes[:on_track].to_s]]])
end
- it 'is ordered by lft asc' do
+ it "is ordered by lft asc" do
expect(find.orders.map { |order| [order.attribute, order.direction] })
- .to eq([['lft', :asc]])
+ .to eq([["lft", :asc]])
end
- it "has the enabled project columns columns as selects" do
- it 'has the enabled_project_columns columns as selects' do
++ it "has the enabled_project_columns columns as selects" do
expect(find.selects.map(&:attribute))
.to eq(Setting.enabled_projects_columns.map(&:to_sym))
end
@@@ -228,15 -250,15 +250,15 @@@
it 'has a filter for projects that are "off track"' do
expect(find.filters.map { |filter| [filter.field, filter.operator, filter.values] })
- .to eq([[:project_status_code, '=', [Project.status_codes[:off_track].to_s]]])
+ .to eq([[:project_status_code, "=", [Project.status_codes[:off_track].to_s]]])
end
- it 'is ordered by lft asc' do
+ it "is ordered by lft asc" do
expect(find.orders.map { |order| [order.attribute, order.direction] })
- .to eq([['lft', :asc]])
+ .to eq([["lft", :asc]])
end
- it "has the enabled project columns columns as selects" do
- it 'has the enabled_project_columns columns as selects' do
++ it "has the enabled_project_columns columns as selects" do
expect(find.selects.map(&:attribute))
.to eq(Setting.enabled_projects_columns.map(&:to_sym))
end
@@@ -257,15 -279,15 +279,15 @@@
it 'has a filter for projects that are "at risk"' do
expect(find.filters.map { |filter| [filter.field, filter.operator, filter.values] })
- .to eq([[:project_status_code, '=', [Project.status_codes[:at_risk].to_s]]])
+ .to eq([[:project_status_code, "=", [Project.status_codes[:at_risk].to_s]]])
end
- it 'is ordered by lft asc' do
+ it "is ordered by lft asc" do
expect(find.orders.map { |order| [order.attribute, order.direction] })
- .to eq([['lft', :asc]])
+ .to eq([["lft", :asc]])
end
- it "has the enabled project columns columns as selects" do
- it 'has the enabled_project_columns columns as selects' do
++ it "has the enabled_project_columns columns as selects" do
expect(find.selects.map(&:attribute))
.to eq(Setting.enabled_projects_columns.map(&:to_sym))
end
@@@ -373,17 -395,17 +395,17 @@@
.to be_nil
end
- it 'has the filters of the default \'active\' query applied' do
+ it "has the filters of the default 'active' query applied" do
expect(find.filters.map { |filter| [filter.field, filter.operator, filter.values] })
- .to eq([[:active, '=', ['t']]])
+ .to eq([[:active, "=", ["t"]]])
end
- it 'has the orders overwritten' do
+ it "has the orders overwritten" do
expect(find.orders.map { |order| [order.attribute, order.direction] })
- .to eq([['id', :asc], ['name', :desc]])
+ .to eq([["id", :asc], ["name", :desc]])
end
- it "has the enabled project columns columns as selects" do
- it 'has the enabled_project_columns columns as selects' do
++ it "has the enabled_project_columns columns as selects" do
expect(find.selects.map(&:attribute))
.to eq(Setting.enabled_projects_columns.map(&:to_sym))
end
@@@ -428,7 -450,7 +450,7 @@@
.to eq([%i[lft asc]])
end
- it "has the enabled project columns columns as selects" do
- it 'has the enabled_project_columns columns as selects' do
++ it "has the enabled_project_columns columns as selects" do
expect(find.selects.map(&:attribute))
.to eq(Setting.enabled_projects_columns.map(&:to_sym))
end
@@@ -625,32 -647,45 +647,45 @@@
.to be_nil
end
end
+
+ context "without id, as non admin and with a non existing custom field id",
+ with_ee: %i[custom_fields_in_projects_list],
+ with_settings: { enabled_projects_columns: %w[name created_at cf_1 cf_42] } do
+ before do
+ custom_field
+ end
+
+ it "has only the available fields (non admin only and only existing cf)" do
+ expect(find.selects.map(&:attribute))
+ .to eq(%i[name cf_1]) # rubocop:disable Naming/VariableNumber
+ end
+ end
end
- describe '.static_query_active' do
+ describe ".static_query_active" do
subject(:find) { described_class.static_query_active }
- it 'returns a project query' do
+ it "returns a project query" do
expect(find)
.to be_a(Queries::Projects::ProjectQuery)
end
- it 'has a name' do
+ it "has a name" do
expect(find.name)
- .to eql(I18n.t('projects.lists.active'))
+ .to eql(I18n.t("projects.lists.active"))
end
- it 'has a filter for active projects' do
+ it "has a filter for active projects" do
expect(find.filters.map { |filter| [filter.field, filter.operator, filter.values] })
- .to eq([[:active, '=', ['t']]])
+ .to eq([[:active, "=", ["t"]]])
end
- it 'is ordered by lft asc' do
+ it "is ordered by lft asc" do
expect(find.orders.map { |order| [order.attribute, order.direction] })
- .to eq([['lft', :asc]])
+ .to eq([["lft", :asc]])
end
- it "has the enabled project columns columns as selects" do
- it 'has the enabled_project_columns columns as selects' do
++ it "has the enabled_project_columns columns as selects" do
expect(find.selects.map(&:attribute))
.to eq(Setting.enabled_projects_columns.map(&:to_sym))
end
@@@ -664,22 -699,22 +699,22 @@@
.to be_a(Queries::Projects::ProjectQuery)
end
- it 'has a name' do
+ it "has a name" do
expect(find.name)
- .to eql(I18n.t('projects.lists.my'))
+ .to eql(I18n.t("projects.lists.my"))
end
- it 'has a filter for projects the user is a member of' do
+ it "has a filter for projects the user is a member of" do
expect(find.filters.map { |filter| [filter.field, filter.operator, filter.values] })
- .to eq([[:member_of, '=', ['t']]])
+ .to eq([[:member_of, "=", ["t"]]])
end
- it 'is ordered by lft asc' do
+ it "is ordered by lft asc" do
expect(find.orders.map { |order| [order.attribute, order.direction] })
- .to eq([['lft', :asc]])
+ .to eq([["lft", :asc]])
end
- it "has the enabled project columns columns as selects" do
- it 'has the enabled_project_columns columns as selects' do
++ it "has the enabled_project_columns columns as selects" do
expect(find.selects.map(&:attribute))
.to eq(Setting.enabled_projects_columns.map(&:to_sym))
end
@@@ -693,22 -728,22 +728,22 @@@
.to be_a(Queries::Projects::ProjectQuery)
end
- it 'has a name' do
+ it "has a name" do
expect(find.name)
- .to eql(I18n.t('projects.lists.archived'))
+ .to eql(I18n.t("projects.lists.archived"))
end
- it 'has a filter for archived projects' do
+ it "has a filter for archived projects" do
expect(find.filters.map { |filter| [filter.field, filter.operator, filter.values] })
- .to eq([[:active, '=', ['f']]])
+ .to eq([[:active, "=", ["f"]]])
end
- it 'is ordered by lft asc' do
+ it "is ordered by lft asc" do
expect(find.orders.map { |order| [order.attribute, order.direction] })
- .to eq([['lft', :asc]])
+ .to eq([["lft", :asc]])
end
- it "has the enabled project columns columns as selects" do
- it 'has the enabled_project_columns columns as selects' do
++ it "has the enabled_project_columns columns as selects" do
expect(find.selects.map(&:attribute))
.to eq(Setting.enabled_projects_columns.map(&:to_sym))
end
@@@ -729,15 -764,15 +764,15 @@@
it 'has a filter for project that are "on track"' do
expect(find.filters.map { |filter| [filter.field, filter.operator, filter.values] })
- .to eq([[:project_status_code, '=', [Project.status_codes[:on_track].to_s]]])
+ .to eq([[:project_status_code, "=", [Project.status_codes[:on_track].to_s]]])
end
- it 'is ordered by lft asc' do
+ it "is ordered by lft asc" do
expect(find.orders.map { |order| [order.attribute, order.direction] })
- .to eq([['lft', :asc]])
+ .to eq([["lft", :asc]])
end
- it "has the enabled project columns columns as selects" do
- it 'has the enabled_project_columns columns as selects' do
++ it "has the enabled_project_columns columns as selects" do
expect(find.selects.map(&:attribute))
.to eq(Setting.enabled_projects_columns.map(&:to_sym))
end
@@@ -758,15 -793,15 +793,15 @@@
it 'has a filter for projects that are "off track"' do
expect(find.filters.map { |filter| [filter.field, filter.operator, filter.values] })
- .to eq([[:project_status_code, '=', [Project.status_codes[:off_track].to_s]]])
+ .to eq([[:project_status_code, "=", [Project.status_codes[:off_track].to_s]]])
end
- it 'is ordered by lft asc' do
+ it "is ordered by lft asc" do
expect(find.orders.map { |order| [order.attribute, order.direction] })
- .to eq([['lft', :asc]])
+ .to eq([["lft", :asc]])
end
- it "has the enabled project columns columns as selects" do
- it 'has the enabled_project_columns columns as selects' do
++ it "has the enabled_project_columns columns as selects" do
expect(find.selects.map(&:attribute))
.to eq(Setting.enabled_projects_columns.map(&:to_sym))
end
@@@ -787,15 -822,15 +822,15 @@@
it 'has a filter for projects that are "at risk"' do
expect(find.filters.map { |filter| [filter.field, filter.operator, filter.values] })
- .to eq([[:project_status_code, '=', [Project.status_codes[:at_risk].to_s]]])
+ .to eq([[:project_status_code, "=", [Project.status_codes[:at_risk].to_s]]])
end
- it 'is ordered by lft asc' do
+ it "is ordered by lft asc" do
expect(find.orders.map { |order| [order.attribute, order.direction] })
- .to eq([['lft', :asc]])
+ .to eq([["lft", :asc]])
end
- it "has the enabled project columns columns as selects" do
- it 'has the enabled_project_columns columns as selects' do
++ it "has the enabled_project_columns columns as selects" do
expect(find.selects.map(&:attribute))
.to eq(Setting.enabled_projects_columns.map(&:to_sym))
end