Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] dev from opf:dev #234

Merged
merged 38 commits into from
Jun 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
0434831
remove obsolete example for nested configuration
machisuji Jun 5, 2024
c18501e
allow changing of direct login provider at runtime
machisuji Jun 5, 2024
c7edd71
we have to use with_config (either that or with_settings) for both op…
machisuji Jun 5, 2024
6908f43
Merge pull request #15766 from opf/port-direct-login-provider-change-…
ulferts Jun 6, 2024
4a88cfb
[#53987] 🇺🇦 Use different Ukraine supporting logos. (#15768)
ba1ash Jun 6, 2024
d928f0f
[#55472] Do not save access token in cookies
ba1ash Jun 4, 2024
e794993
fix protocol in deployment status check
machisuji Jun 6, 2024
9a50145
[#54749] Vertically center the `include sub-projects` checkbox (#15770)
akabiru Jun 6, 2024
f0a36ad
Do not trigger development seeders if installation is obviously old
cbliard Jun 6, 2024
c716893
[55431] Fix error message when duration input is invalid
cbliard Jun 6, 2024
69b61c3
Handle conversion of duration strings to hours in model
cbliard Jun 6, 2024
c96c176
Merge pull request #15772 from opf/bug/55431-display-is-not-a-valid-d…
aaron-contreras Jun 6, 2024
72e1ad1
Merge branch 'dev' into code-maintenance/55472-do-not-save-access-tok…
ba1ash Jun 6, 2024
1e5d1f2
update locales from crowdin [ci skip]
openprojectci Jun 7, 2024
5b442c1
update locales from crowdin [ci skip]
openprojectci Jun 7, 2024
537467d
Merge branch 'release/14.2' into dev
openprojectci Jun 7, 2024
5330b41
Bump @openproject/primer-view-components in /frontend
dependabot[bot] Jun 7, 2024
f95a950
Bump zone.js from 0.14.6 to 0.14.7 in /frontend
dependabot[bot] Jun 7, 2024
ea37f25
Bump openproject-primer_view_components from 0.33.1 to 0.33.2
dependabot[bot] Jun 7, 2024
4c4d176
[55431] Fix error message when duration input is invalid
cbliard Jun 7, 2024
9af31fc
Merge pull request #15771 from opf/fix/avoid_dev_seeders_for_non_rece…
cbliard Jun 7, 2024
f1c89c4
Merge pull request #15774 from opf/dependabot/npm_and_yarn/frontend/d…
ulferts Jun 7, 2024
c4596f1
Merge pull request #15775 from opf/dependabot/npm_and_yarn/frontend/d…
ulferts Jun 7, 2024
d93550f
Merge pull request #15776 from opf/dependabot/bundler/dev/openproject…
ulferts Jun 7, 2024
0854e1b
Move queries preview into the OpenProject folder
HDinger Jun 7, 2024
09b1272
Merge pull request #15758 from opf/documentation/update-section-on-ne…
ulferts Jun 7, 2024
5da3cbe
remove obsolete example for nested configuration
machisuji Jun 5, 2024
d275931
[#55495] 14.2 Documentation: Allow renaming persisted project lists …
MayaBerd Jun 7, 2024
400d3b0
[#55472] Extend omniauth_user_authorized comment.
ba1ash Jun 7, 2024
61833ed
Remove fixed height value of ngSelect, as the input will otherwise no…
HDinger Jun 7, 2024
eff4db9
[#55493] 14.2 Documentation: Transform remove action from share modal…
MayaBerd Jun 7, 2024
bb1721c
Merge pull request #15781 from opf/fix/ng-select-height
HDinger Jun 7, 2024
8b026c8
Merge pull request #15745 from opf/code-maintenance/55472-do-not-save…
ba1ash Jun 7, 2024
60d9f70
Task/55493 14 documentation transform remove action from share modals…
MayaBerd Jun 7, 2024
3db2258
provisional release notes for 14.2
ulferts Jun 7, 2024
aed7bb4
update locales from crowdin [ci skip]
openprojectci Jun 8, 2024
24b00cd
update locales from crowdin [ci skip]
openprojectci Jun 8, 2024
41bd882
Merge branch 'release/14.2' into dev
openprojectci Jun 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ GEM
brakeman (6.1.2)
racc
browser (6.0.0)
builder (3.2.4)
builder (3.3.0)
byebug (11.1.3)
capybara (3.40.0)
addressable
Expand Down Expand Up @@ -775,7 +775,7 @@ GEM
actionview
openproject-octicons (= 19.14.0)
railties
openproject-primer_view_components (0.33.1)
openproject-primer_view_components (0.33.2)
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
openproject-octicons (>= 19.12.0)
Expand Down
Binary file modified app/assets/images/logo-black-bg-ua.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/assets/images/logo-white-bg-ua.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@
&:before
@include icon-font-common
margin-right: 10px

.FormControl-horizontalGroup
display: flex
align-items: center
justify-content: space-between
12 changes: 1 addition & 11 deletions app/controllers/work_packages/progress_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -130,17 +130,7 @@ def extract_persisted_progress_attributes

def work_package_params
params.require(:work_package)
.permit(allowed_params).tap do |wp_params|
%w[estimated_hours remaining_hours].each do |attr|
if wp_params[attr].present?
begin
wp_params[attr] = DurationConverter.parse(wp_params[attr])
rescue ChronicDuration::DurationParseError
@work_package.errors.add(attr.to_sym, :invalid)
end
end
end
end
.permit(allowed_params)
end

def allowed_params
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/omniauth_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ def omniauth_direct_login?
# If this option is active /login will lead directly to the configured omniauth provider
# and so will a click on 'Sign in' (as opposed to opening the drop down menu).
def direct_login_provider
OpenProject::Configuration["omniauth_direct_login_provider"]
Setting.omniauth_direct_login_provider
end
end
17 changes: 13 additions & 4 deletions app/models/work_package.rb
Original file line number Diff line number Diff line change
Expand Up @@ -315,13 +315,11 @@ def hide_attachments?
end

def estimated_hours=(hours)
converted_hours = (hours.is_a?(String) ? hours.to_hours : hours)
write_attribute :estimated_hours, !!converted_hours ? converted_hours : hours
write_attribute :estimated_hours, convert_duration_to_hours(hours)
end

def remaining_hours=(hours)
converted_hours = (hours.is_a?(String) ? hours.to_hours : hours)
write_attribute :remaining_hours, !!converted_hours ? converted_hours : hours
write_attribute :remaining_hours, convert_duration_to_hours(hours)
end

def duration_in_hours
Expand Down Expand Up @@ -546,6 +544,17 @@ def add_time_entry_for(user, attributes)
time_entries.build(attributes)
end

def convert_duration_to_hours(value)
if value.is_a?(String)
begin
value = value.blank? ? nil : DurationConverter.parse(value)
rescue ChronicDuration::DurationParseError
# keep invalid value, error shall be caught by numericality validator
end
end
value
end

##
# Checks if the time entry defined by the given attributes is blank.
# A time entry counts as blank despite a selected activity if that activity
Expand Down
8 changes: 7 additions & 1 deletion app/seeders/development_data/projects_seeder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,13 @@ def seed_data!
end

def applicable?
Project.where(identifier: project_identifiers).count == 0
recent_installation? && Project.where(identifier: project_identifiers).count == 0
end

# returns true if no projects have been created more than 1 hour ago,
# meaning this is a recent installation
def recent_installation?
Project.where(created_at: ..1.hour.ago).none?
end

def project_identifiers
Expand Down
2 changes: 2 additions & 0 deletions config/locales/crowdin/af.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1039,11 +1039,13 @@ af:
only_same_project_categories_allowed: "Die katagorie van 'n werkspakket moet binne in dieselfde projek wees as die werkspakket."
does_not_exist: "Die spesefieke kategorie bestaan nie."
estimated_hours:
not_a_number: "is not a valid duration."
cant_be_inferior_to_remaining_work: "Cannot be lower than Remaining work."
must_be_set_when_remaining_work_is_set: "Required when Remaining work is set."
only_values_greater_or_equal_zeroes_allowed: "Must be >= 0."
format: "%{message}"
remaining_hours:
not_a_number: "is not a valid duration."
cant_exceed_work: "Cannot be higher than Work."
must_be_set_when_work_is_set: "Required when Work is set."
format: "%{message}"
Expand Down
2 changes: 2 additions & 0 deletions config/locales/crowdin/ar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1067,11 +1067,13 @@ ar:
only_same_project_categories_allowed: "يجب أن يكون فئة مجموعة العمل ضمن نفس المشروع كمجموعة عمل."
does_not_exist: "الفئة المحددة غير موجودة."
estimated_hours:
not_a_number: "is not a valid duration."
cant_be_inferior_to_remaining_work: "Cannot be lower than Remaining work."
must_be_set_when_remaining_work_is_set: "Required when Remaining work is set."
only_values_greater_or_equal_zeroes_allowed: "Must be >= 0."
format: "%{message}"
remaining_hours:
not_a_number: "is not a valid duration."
cant_exceed_work: "Cannot be higher than Work."
must_be_set_when_work_is_set: "Required when Work is set."
format: "%{message}"
Expand Down
2 changes: 2 additions & 0 deletions config/locales/crowdin/az.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1039,11 +1039,13 @@ az:
only_same_project_categories_allowed: "The category of a work package must be within the same project as the work package."
does_not_exist: "The specified category does not exist."
estimated_hours:
not_a_number: "is not a valid duration."
cant_be_inferior_to_remaining_work: "Cannot be lower than Remaining work."
must_be_set_when_remaining_work_is_set: "Required when Remaining work is set."
only_values_greater_or_equal_zeroes_allowed: "Must be >= 0."
format: "%{message}"
remaining_hours:
not_a_number: "is not a valid duration."
cant_exceed_work: "Cannot be higher than Work."
must_be_set_when_work_is_set: "Required when Work is set."
format: "%{message}"
Expand Down
2 changes: 2 additions & 0 deletions config/locales/crowdin/be.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1053,11 +1053,13 @@ be:
only_same_project_categories_allowed: "The category of a work package must be within the same project as the work package."
does_not_exist: "The specified category does not exist."
estimated_hours:
not_a_number: "is not a valid duration."
cant_be_inferior_to_remaining_work: "Cannot be lower than Remaining work."
must_be_set_when_remaining_work_is_set: "Required when Remaining work is set."
only_values_greater_or_equal_zeroes_allowed: "Must be >= 0."
format: "%{message}"
remaining_hours:
not_a_number: "is not a valid duration."
cant_exceed_work: "Cannot be higher than Work."
must_be_set_when_work_is_set: "Required when Work is set."
format: "%{message}"
Expand Down
2 changes: 2 additions & 0 deletions config/locales/crowdin/bg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1039,11 +1039,13 @@ bg:
only_same_project_categories_allowed: "Категорията на работен пакет трябва да бъде в същия проект като работния пакет."
does_not_exist: "Определената категория не съществува."
estimated_hours:
not_a_number: "is not a valid duration."
cant_be_inferior_to_remaining_work: "Cannot be lower than Remaining work."
must_be_set_when_remaining_work_is_set: "Required when Remaining work is set."
only_values_greater_or_equal_zeroes_allowed: "Must be >= 0."
format: "%{message}"
remaining_hours:
not_a_number: "is not a valid duration."
cant_exceed_work: "Cannot be higher than Work."
must_be_set_when_work_is_set: "Required when Work is set."
format: "%{message}"
Expand Down
2 changes: 2 additions & 0 deletions config/locales/crowdin/ca.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1035,11 +1035,13 @@ ca:
only_same_project_categories_allowed: "La categoria d'un paquet de treball ha d'estar al mateix projecte que el paquet de treball."
does_not_exist: "La categoria especificada no existeix."
estimated_hours:
not_a_number: "is not a valid duration."
cant_be_inferior_to_remaining_work: "No pot ser inferior al treball restant."
must_be_set_when_remaining_work_is_set: "Required when Remaining work is set."
only_values_greater_or_equal_zeroes_allowed: "Must be >= 0."
format: "%{message}"
remaining_hours:
not_a_number: "is not a valid duration."
cant_exceed_work: "Cannot be higher than Work."
must_be_set_when_work_is_set: "Required when Work is set."
format: "%{message}"
Expand Down
2 changes: 2 additions & 0 deletions config/locales/crowdin/ckb-IR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1039,11 +1039,13 @@ ckb-IR:
only_same_project_categories_allowed: "The category of a work package must be within the same project as the work package."
does_not_exist: "The specified category does not exist."
estimated_hours:
not_a_number: "is not a valid duration."
cant_be_inferior_to_remaining_work: "Cannot be lower than Remaining work."
must_be_set_when_remaining_work_is_set: "Required when Remaining work is set."
only_values_greater_or_equal_zeroes_allowed: "Must be >= 0."
format: "%{message}"
remaining_hours:
not_a_number: "is not a valid duration."
cant_exceed_work: "Cannot be higher than Work."
must_be_set_when_work_is_set: "Required when Work is set."
format: "%{message}"
Expand Down
Loading
Loading