Merge branch 'dev' into 45001-component-to-show-the-list-of-non-working-days-of-year

45001-component-to-show-the-list-of-non-working-days-of-year
bsatarnejad 2 years ago
commit fd8e3d0cde
  1. 2
      Gemfile
  2. 31
      Gemfile.lock
  3. 2
      config/locales/crowdin/af.yml
  4. 2
      config/locales/crowdin/ar.yml
  5. 2
      config/locales/crowdin/az.yml
  6. 2
      config/locales/crowdin/bg.yml
  7. 2
      config/locales/crowdin/ca.yml
  8. 2
      config/locales/crowdin/ckb-IR.yml
  9. 2
      config/locales/crowdin/cs.yml
  10. 2
      config/locales/crowdin/da.yml
  11. 2
      config/locales/crowdin/de.yml
  12. 2
      config/locales/crowdin/el.yml
  13. 2
      config/locales/crowdin/eo.yml
  14. 2
      config/locales/crowdin/es.yml
  15. 2
      config/locales/crowdin/et.yml
  16. 2
      config/locales/crowdin/fa.yml
  17. 2
      config/locales/crowdin/fi.yml
  18. 2
      config/locales/crowdin/fil.yml
  19. 2
      config/locales/crowdin/fr.yml
  20. 2
      config/locales/crowdin/he.yml
  21. 2
      config/locales/crowdin/hi.yml
  22. 2
      config/locales/crowdin/hr.yml
  23. 2
      config/locales/crowdin/hu.yml
  24. 2
      config/locales/crowdin/id.yml
  25. 2
      config/locales/crowdin/it.yml
  26. 2
      config/locales/crowdin/ja.yml
  27. 2
      config/locales/crowdin/ko.yml
  28. 2
      config/locales/crowdin/lol.yml
  29. 2
      config/locales/crowdin/lt.yml
  30. 2
      config/locales/crowdin/lv.yml
  31. 2
      config/locales/crowdin/ne.yml
  32. 2
      config/locales/crowdin/nl.yml
  33. 2
      config/locales/crowdin/no.yml
  34. 2
      config/locales/crowdin/pl.yml
  35. 2
      config/locales/crowdin/pt.yml
  36. 2
      config/locales/crowdin/ro.yml
  37. 2
      config/locales/crowdin/ru.yml
  38. 2
      config/locales/crowdin/rw.yml
  39. 2
      config/locales/crowdin/si.yml
  40. 2
      config/locales/crowdin/sk.yml
  41. 2
      config/locales/crowdin/sl.yml
  42. 2
      config/locales/crowdin/sv.yml
  43. 2
      config/locales/crowdin/th.yml
  44. 2
      config/locales/crowdin/tr.yml
  45. 2
      config/locales/crowdin/uk.yml
  46. 2
      config/locales/crowdin/vi.yml
  47. 2
      config/locales/crowdin/zh-TW.yml
  48. 2
      docs/enterprise-guide/README.md
  49. 968
      frontend/package-lock.json
  50. 12
      frontend/src/app/shared/components/op-view-select/op-static-queries.service.ts
  51. 12
      modules/backlogs/spec/api/work_packages/schema/specific_work_package_schema_spec.rb
  52. 8
      modules/dashboards/spec/lib/dashboards/grid_registration_spec.rb
  53. 2
      modules/two_factor_authentication/openproject-two_factor_authentication.gemspec
  54. 4
      spec/constants/settings/definition_spec.rb
  55. 59
      spec/features/work_packages/table/queries/default_queries_spec.rb
  56. 36
      spec/lib/api/v3/work_packages/schema/specific_work_package_schema_spec.rb
  57. 10
      spec/lib/api/v3/work_packages/schema/typed_work_package_schema_spec.rb
  58. 2
      spec/support/pages/work_packages/work_packages_table.rb

@ -177,7 +177,7 @@ gem 'puma', '~> 5.6'
gem 'puma-plugin-statsd', '~> 2.0'
gem 'rack-timeout', '~> 0.6.3', require: "rack/timeout/base"
gem 'nokogiri', '~> 1.13.9'
gem 'nokogiri', '~> 1.13.10'
gem 'carrierwave', '~> 1.3.1'
gem 'carrierwave_direct', '~> 2.1.0'

@ -169,7 +169,7 @@ PATH
remote: modules/two_factor_authentication
specs:
openproject-two_factor_authentication (1.0.0)
aws-sdk-sns (~> 1.56.0)
aws-sdk-sns (~> 1.57.0)
messagebird-rest (~> 1.4.2)
rotp (~> 6.1)
@ -291,8 +291,8 @@ GEM
awesome_nested_set (3.5.0)
activerecord (>= 4.0.0, < 7.1)
aws-eventstream (1.2.0)
aws-partitions (1.670.0)
aws-sdk-core (3.168.2)
aws-partitions (1.671.0)
aws-sdk-core (3.168.3)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.5)
@ -304,7 +304,7 @@ GEM
aws-sdk-core (~> 3, >= 3.165.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.4)
aws-sdk-sns (1.56.0)
aws-sdk-sns (1.57.0)
aws-sdk-core (~> 3, >= 3.165.0)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.5.2)
@ -513,7 +513,7 @@ GEM
formatador (1.1.0)
friendly_id (5.5.0)
activerecord (>= 4.0.0)
fugit (1.7.2)
fugit (1.8.0)
et-orbi (~> 1, >= 1.2.7)
raabro (~> 1.4)
fuubar (2.5.1)
@ -566,13 +566,13 @@ GEM
reline (>= 0.3.0)
iso8601 (0.13.0)
jmespath (1.6.2)
json (2.6.2)
json (2.6.3)
json-jwt (1.15.3)
activesupport (>= 4.2)
aes_key_wrap
bindata
httpclient
json_schemer (0.2.23)
json_schemer (0.2.24)
ecma-re-validator (~> 0.3)
hana (~> 1.3)
regexp_parser (~> 2.0)
@ -588,7 +588,7 @@ GEM
open4 (~> 1.0)
launchy (2.5.0)
addressable (~> 2.7)
lefthook (1.2.3)
lefthook (1.2.4)
letter_opener (1.8.1)
launchy (>= 2.2, < 3)
listen (3.7.1)
@ -612,8 +612,11 @@ GEM
loofah (2.19.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
mail (2.8.0)
mini_mime (>= 0.1.1)
net-imap
net-pop
net-smtp
marcel (1.0.2)
matrix (0.4.2)
messagebird-rest (1.4.2)
@ -641,14 +644,14 @@ GEM
net-ldap (0.17.1)
net-pop (0.1.2)
net-protocol
net-protocol (0.1.3)
net-protocol (0.2.0)
timeout
net-smtp (0.3.3)
net-protocol
netrc (0.11.0)
nio4r (2.5.8)
no_proxy_fix (0.1.2)
nokogiri (1.13.9)
nokogiri (1.13.10)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
octokit (5.6.1)
@ -731,7 +734,7 @@ GEM
puma-plugin-statsd (2.3.0)
puma (>= 5.0, < 6)
raabro (1.4.0)
racc (1.6.0)
racc (1.6.1)
rack (2.2.4)
rack-accept (0.4.5)
rack (>= 0.4)
@ -943,7 +946,7 @@ GEM
thor (1.2.1)
tilt (2.0.11)
timecop (0.9.6)
timeout (0.3.0)
timeout (0.3.1)
trailblazer-option (0.1.2)
ttfunk (1.7.0)
typed_dag (2.0.2)
@ -1069,7 +1072,7 @@ DEPENDENCIES
multi_json (~> 1.15.0)
my_page!
net-ldap (~> 0.17.0)
nokogiri (~> 1.13.9)
nokogiri (~> 1.13.10)
oj (~> 3.13.0)
okcomputer (~> 1.18.1)
omniauth!

@ -637,7 +637,7 @@ af:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "The provides SSL certificate is invalid: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -641,7 +641,7 @@ ar:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "The provides SSL certificate is invalid: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -637,7 +637,7 @@ az:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "The provides SSL certificate is invalid: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -637,7 +637,7 @@ bg:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "The provides SSL certificate is invalid: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -633,7 +633,7 @@ ca:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "El certificat SSL proporcionat és invàlid: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -637,7 +637,7 @@ ckb-IR:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "The provides SSL certificate is invalid: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -639,7 +639,7 @@ cs:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "The provides SSL certificate is invalid: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -635,7 +635,7 @@ da:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "The provides SSL certificate is invalid: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -632,7 +632,7 @@ de:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "Das zur Verfügung gestellte SSL-Zertifikat ist ungültig: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -633,7 +633,7 @@ el:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "The provides SSL certificate is invalid: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -637,7 +637,7 @@ eo:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "The provides SSL certificate is invalid: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -634,7 +634,7 @@ es:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "El certificado SSL proporcionado no es válido: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -637,7 +637,7 @@ et:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "The provides SSL certificate is invalid: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -637,7 +637,7 @@ fa:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "The provides SSL certificate is invalid: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -637,7 +637,7 @@ fi:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "The provides SSL certificate is invalid: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -637,7 +637,7 @@ fil:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "The provides SSL certificate is invalid: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -637,7 +637,7 @@ fr:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "The provides SSL certificate is invalid: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -639,7 +639,7 @@ he:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "The provides SSL certificate is invalid: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -635,7 +635,7 @@ hi:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "The provides SSL certificate is invalid: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -638,7 +638,7 @@ hr:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "The provides SSL certificate is invalid: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -634,7 +634,7 @@ hu:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "The provides SSL certificate is invalid: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -633,7 +633,7 @@ id:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "The provides SSL certificate is invalid: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -634,7 +634,7 @@ it:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "Il certificato SSL fornito non è valido: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -632,7 +632,7 @@ ja:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "The provides SSL certificate is invalid: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -635,7 +635,7 @@ ko:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "The provides SSL certificate is invalid: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -619,7 +619,7 @@ lol:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "crwdns838883:0%{additional_message}crwdne838883:0"
invalid_certificate: "crwdns842291:0%{additional_message}crwdne842291:0"
format: "crwdns838885:0%{message}crwdne838885:0"
attachment:
attributes:

@ -636,7 +636,7 @@ lt:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "The provides SSL certificate is invalid: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -638,7 +638,7 @@ lv:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "The provides SSL certificate is invalid: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -637,7 +637,7 @@ ne:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "The provides SSL certificate is invalid: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -634,7 +634,7 @@ nl:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "The provides SSL certificate is invalid: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -637,7 +637,7 @@
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "The provides SSL certificate is invalid: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -636,7 +636,7 @@ pl:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "The provides SSL certificate is invalid: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -636,7 +636,7 @@ pt:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "The provides SSL certificate is invalid: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -638,7 +638,7 @@ ro:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "Certificatul SSL furnizat nu este valabil: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -638,7 +638,7 @@ ru:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "Предоставленный сертификат SSL недействителен: %{additional_message}"
invalid_certificate: "Указанный сертификат SSL недействителен: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -637,7 +637,7 @@ rw:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "The provides SSL certificate is invalid: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -637,7 +637,7 @@ si:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "The provides SSL certificate is invalid: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -639,7 +639,7 @@ sk:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "The provides SSL certificate is invalid: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -636,7 +636,7 @@ sl:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "The provides SSL certificate is invalid: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -636,7 +636,7 @@ sv:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "The provides SSL certificate is invalid: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -636,7 +636,7 @@ th:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "The provides SSL certificate is invalid: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -637,7 +637,7 @@ tr:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "Sağlanan SSL sertifikası geçersiz: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -634,7 +634,7 @@ uk:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "The provides SSL certificate is invalid: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -638,7 +638,7 @@ vi:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "The provides SSL certificate is invalid: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -636,7 +636,7 @@ zh-TW:
auth_source:
attributes:
tls_certificate_string:
invalid_certificate: "The provides SSL certificate is invalid: %{additional_message}"
invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}"
format: "%{message}"
attachment:
attributes:

@ -12,7 +12,7 @@ Welcome to the OpenProject **Enterprise guide**.
> **Note**: This guide only describes the management and administration of your Enterprise cloud and Enterprise on-premises subscription.
> The Enterprise add-on descriptions are included in the respective parts of the OpenProject [user guide](../user-guide) and [System admin guide](../system-admin-guide).
The OpenProject Enterprise editions (cloud and on-premises) contain all OpenProject Community features plus the additional OpenProject [Enterprise add-ons](https://www.openproject.org/de/enterprise-edition/#enterprise-add-ons), as well as professional [support](https://www.openproject.org/pricing/#support).
The OpenProject Enterprise editions (cloud and on-premises) contain all OpenProject Community features plus the additional OpenProject [Enterprise add-ons](https://www.openproject.org/enterprise-edition/#enterprise-add-ons), as well as professional [support](https://www.openproject.org/pricing/#support).
Find a detailed feature comparison [here](https://www.openproject.org/pricing/#features).

File diff suppressed because it is too large Load Diff

@ -66,6 +66,7 @@ export class StaticQueriesService {
recently_created: this.I18n.t('js.work_packages.default_queries.recently_created'),
all_open: this.I18n.t('js.work_packages.default_queries.all_open'),
summary: this.I18n.t('js.work_packages.default_queries.summary'),
overdue: this.I18n.t('js.notifications.date_alerts.overdue'),
};
public getStaticName(query:QueryResource):string {
@ -109,7 +110,7 @@ export class StaticQueriesService {
uiSref: 'work-packages',
uiParams: {
query_id: '',
query_props: '{"c":["id","subject","type","status","assignee","updatedAt"],"hi":false,"g":"","t":"updatedAt:desc","f":[{"n":"status","o":"o","v":[]}]}',
query_props: '{"c":["id","subject","type","status","assignee","updatedAt"],"hi":false,"g":"","t":"updatedAt:desc","f":[{"n":"status","o":"*","v":[]}]}',
},
view: 'WorkPackagesTable',
},
@ -131,6 +132,15 @@ export class StaticQueriesService {
},
view: 'WorkPackagesTable',
},
{
title: this.text.overdue,
uiSref: 'work-packages',
uiParams: {
query_id: '',
query_props: '{"c":["id","type","subject","status","startDate","dueDate","duration"],"hi":false,"g":"","t":"createdAt:desc","f":[{"n":"dueDate","o":"<t-","v":["1"]},{"n":"status","o":"o","v":[]}]}',
},
view: 'WorkPackagesTable',
},
{
title: this.text.all_open,
uiSref: 'bim.partitioned.list',

@ -53,7 +53,11 @@ describe ::API::V3::WorkPackages::Schema::SpecificWorkPackageSchema do
end
it "is #{'not' unless writable} writable" do
expect(subject.writable?(:version)).to eql(writable)
if writable
expect(subject).to be_writable(:version)
else
expect(subject).not_to be_writable(:version)
end
end
end
@ -66,7 +70,7 @@ describe ::API::V3::WorkPackages::Schema::SpecificWorkPackageSchema do
end
it "is writable" do
expect(subject.writable?(:version)).to be(true)
expect(subject).to be_writable(:version)
end
end
@ -83,7 +87,7 @@ describe ::API::V3::WorkPackages::Schema::SpecificWorkPackageSchema do
end
it 'is writable' do
expect(subject.writable?(:remaining_hours)).to be(true)
expect(subject).to be_writable(:remaining_hours)
end
end
@ -93,7 +97,7 @@ describe ::API::V3::WorkPackages::Schema::SpecificWorkPackageSchema do
end
it 'is not writable' do
expect(subject.writable?(:remaining_hours)).to be(false)
expect(subject).not_to be_writable(:remaining_hours)
end
end
end

@ -66,8 +66,8 @@ describe Dashboards::GridRegistration do
context 'if the user has the :manage_dashboards permission' do
it 'is truthy' do
expect(described_class.writable?(grid, user))
.to be_truthy
expect(described_class)
.to be_writable(grid, user)
end
end
@ -75,8 +75,8 @@ describe Dashboards::GridRegistration do
let(:allowed) { false }
it 'is falsey' do
expect(described_class.writable?(grid, user))
.to be_falsey
expect(described_class)
.not_to be_writable(grid, user)
end
end
end

@ -12,6 +12,6 @@ Gem::Specification.new do |s|
s.add_dependency 'messagebird-rest', '~> 1.4.2'
s.add_dependency 'rotp', '~> 6.1'
s.add_dependency 'aws-sdk-sns', '~> 1.56.0'
s.add_dependency 'aws-sdk-sns', '~> 1.57.0'
s.metadata['rubygems_mfa_required'] = 'true'
end

@ -909,8 +909,8 @@ describe Settings::Definition do
end
it 'returns the procs return value for writable' do
expect(instance.writable?)
.to be false
expect(instance)
.not_to be_writable
end
it 'returns the procs return value for allowed' do

@ -0,0 +1,59 @@
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) 2012-2022 the OpenProject GmbH
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License version 3.
#
# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2010-2013 the ChiliProject Team
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# See COPYRIGHT and LICENSE files for more details.
#++
require 'spec_helper'
describe 'Default work package queries', js: true do
create_shared_association_defaults_for_work_package_factory
shared_let(:user) { create(:admin) }
current_user { user }
let(:wp_table) { ::Pages::WorkPackagesTable.new(project_with_types) }
describe 'Overdue' do
let!(:work_package) { create(:work_package, subject: 'Not overdue', due_date: 5.days.from_now) }
let!(:due_today_work_package) { create(:work_package, subject: 'Not overdue', due_date: Time.zone.today) }
let!(:overdue_work_package_1_day_ago) { create(:work_package, subject: 'Overdue 1 day ago', due_date: 1.day.ago) }
let!(:overdue_work_package_2_days_ago) { create(:work_package, subject: 'Overdue 2 days ago', due_date: 2.days.ago) }
let!(:closed_status) { create(:closed_status) }
let!(:closed_work_package) { create(:work_package, subject: 'Closed', status: closed_status, due_date: 10.days.ago) }
it 'shows the overdue work package' do
wp_table.visit!
wp_table.expect_work_package_listed work_package, due_today_work_package, overdue_work_package_1_day_ago,
overdue_work_package_2_days_ago
click_link 'Overdue', wait: 10
wp_table.expect_work_package_listed overdue_work_package_1_day_ago, overdue_work_package_2_days_ago
wp_table.ensure_work_package_not_listed! closed_work_package, work_package, due_today_work_package
end
end
end

@ -176,46 +176,46 @@ describe ::API::V3::WorkPackages::Schema::SpecificWorkPackageSchema do
context 'percentage done' do
it 'is not writable when inferred by status' do
allow(Setting).to receive(:work_package_done_ratio).and_return('status')
expect(subject.writable?('done_ratio')).to be false
expect(subject).not_to be_writable(:done_ratio)
end
it 'is not writable when disabled' do
allow(Setting).to receive(:work_package_done_ratio).and_return('disabled')
expect(subject.writable?('done_ratio')).to be false
expect(subject).not_to be_writable(:done_ratio)
end
it 'is not writable when the work package is a parent' do
allow(work_package).to receive(:leaf?).and_return(false)
expect(subject.writable?('done_ratio')).to be false
expect(subject).not_to be_writable(:done_ratio)
end
it 'is writable when the work package is a leaf' do
allow(work_package).to receive(:leaf?).and_return(true)
expect(subject.writable?('done_ratio')).to be true
expect(subject).to be_writable('done_ratio')
end
end
context 'estimated time' do
it 'is writable when the work package is a parent' do
allow(work_package).to receive(:leaf?).and_return(false)
expect(subject.writable?('estimated_hours')).to be true
expect(subject).to be_writable(:estimated_hours)
end
it 'is writable when the work package is a leaf' do
allow(work_package).to receive(:leaf?).and_return(true)
expect(subject.writable?('estimated_hours')).to be true
expect(subject).to be_writable(:estimated_hours)
end
end
context 'derived estimated time' do
it 'is not writable when the work package is a parent' do
allow(work_package).to receive(:leaf?).and_return(false)
expect(subject.writable?('derived_estimated_time')).to be false
expect(subject).not_to be_writable(:derived_estimated_time)
end
it 'is not writable when the work package is a leaf' do
allow(work_package).to receive(:leaf?).and_return(true)
expect(subject.writable?('derived_estimated_time')).to be false
expect(subject).not_to be_writable(:derived_estimated_time)
end
end
@ -229,7 +229,7 @@ describe ::API::V3::WorkPackages::Schema::SpecificWorkPackageSchema do
context 'scheduled automatically' do
it 'is not writable' do
expect(subject.writable?('start_date')).to be false
expect(subject).not_to be_writable(:start_date)
end
end
@ -239,7 +239,7 @@ describe ::API::V3::WorkPackages::Schema::SpecificWorkPackageSchema do
end
it 'is writable' do
expect(subject.writable?('start_date')).to be true
expect(subject).to be_writable(:start_date)
end
end
end
@ -247,7 +247,7 @@ describe ::API::V3::WorkPackages::Schema::SpecificWorkPackageSchema do
context 'work package is a leaf' do
it 'is writable' do
allow(work_package).to receive(:leaf?).and_return(true)
expect(subject.writable?('start_date')).to be true
expect(subject).to be_writable(:start_date)
end
end
end
@ -262,7 +262,7 @@ describe ::API::V3::WorkPackages::Schema::SpecificWorkPackageSchema do
context 'scheduled automatically' do
it 'is not writable' do
expect(subject.writable?('due_date')).to be false
expect(subject).not_to be_writable(:due_date)
end
end
@ -272,7 +272,7 @@ describe ::API::V3::WorkPackages::Schema::SpecificWorkPackageSchema do
end
it 'is writable' do
expect(subject.writable?('due_date')).to be true
expect(subject).to be_writable(:due_date)
end
end
end
@ -280,7 +280,7 @@ describe ::API::V3::WorkPackages::Schema::SpecificWorkPackageSchema do
context 'work package is a leaf' do
it 'is writable' do
allow(work_package).to receive(:leaf?).and_return(true)
expect(subject.writable?('due_date')).to be true
expect(subject).to be_writable(:due_date)
end
end
end
@ -294,24 +294,24 @@ describe ::API::V3::WorkPackages::Schema::SpecificWorkPackageSchema do
it 'is not writable when the work package is a parent' do
allow(work_package).to receive(:leaf?).and_return(false)
expect(subject.writable?('date')).to be false
expect(subject).not_to be_writable(:date)
end
it 'is writable when the work package is a leaf' do
allow(work_package).to receive(:leaf?).and_return(true)
expect(subject.writable?('date')).to be true
expect(subject).to be_writable(:date)
end
end
context 'priority' do
it 'is writable when the work package is a parent' do
allow(work_package).to receive(:leaf?).and_return(false)
expect(subject.writable?('priority')).to be true
expect(subject).to be_writable(:priority)
end
it 'is writable when the work package is a leaf' do
allow(work_package).to receive(:leaf?).and_return(true)
expect(subject.writable?('priority')).to be true
expect(subject).to be_writable(:priority)
end
end
end

@ -64,19 +64,19 @@ describe ::API::V3::WorkPackages::Schema::TypedWorkPackageSchema do
describe '#writable?' do
it 'percentage done is writable' do
expect(subject.writable?(:done_ratio)).to be true
expect(subject).to be_writable(:done_ratio)
end
it 'estimated time is writable' do
expect(subject.writable?(:estimated_hours)).to be true
expect(subject).to be_writable(:estimated_hours)
end
it 'start date is writable' do
expect(subject.writable?(:start_date)).to be true
expect(subject).to be_writable(:start_date)
end
it 'finish date is writable' do
expect(subject.writable?(:due_date)).to be true
expect(subject).to be_writable(:due_date)
end
end
@ -98,7 +98,7 @@ describe ::API::V3::WorkPackages::Schema::TypedWorkPackageSchema do
end
it 'has a writable date' do
expect(subject.writable?(:date)).to be true
expect(subject).to be_writable(:date)
end
end

@ -107,7 +107,7 @@ module Pages
retry_block(args: { tries: 3, base_interval: 5 }) do
within(table_container) do
work_packages.each do |wp|
page.raise_if_found(".wp-row-#{wp.id} td.subject", text: wp.subject)
page.raise_if_found(".wp-row-#{wp.id} td.subject", text: wp.subject, wait: 1)
end
end
end

Loading…
Cancel
Save