Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: UKGovernmentBEIS/beis-report-official-development-assistance
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: release-163
Choose a base ref
...
head repository: UKGovernmentBEIS/beis-report-official-development-assistance
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: develop
Choose a head ref
Loading
Showing with 2,582 additions and 2,084 deletions.
  1. +6 −0 .env.example
  2. +3 −0 .env.test
  3. +1 −1 .ruby-version
  4. +81 −2 CHANGELOG.md
  5. +1 −1 Dockerfile
  6. +6 −4 Gemfile
  7. +172 −126 Gemfile.lock
  8. +2 −3 README.md
  9. +16 −28 app/controllers/exports_controller.rb
  10. +2 −2 app/controllers/forecasts_controller.rb
  11. +2 −10 app/helpers/activity_helper.rb
  12. +1 −0 app/javascript/application.js
  13. +40 −0 app/javascript/src/warn-dsit-organisation-change.js
  14. +9 −0 app/jobs/anonymise_deactivated_users_job.rb
  15. +12 −12 app/models/activity.rb
  16. +1 −1 app/models/budget.rb
  17. +1 −1 app/models/forecast.rb
  18. +2 −2 app/models/matched_effort.rb
  19. +1 −1 app/models/organisation.rb
  20. +1 −1 app/models/report.rb
  21. +1 −2 app/models/user.rb
  22. +2 −2 app/policies/export_policy.rb
  23. +25 −0 app/presenters/activity_csv_presenter.rb
  24. +22 −0 app/services/activity/import.rb
  25. +2 −0 app/services/activity/import/creator.rb
  26. +2 −0 app/services/activity/import/updater.rb
  27. +121 −0 app/services/export/activities_level_b.rb
  28. +0 −182 app/services/export/continuing_activities.rb
  29. +40 −0 app/views/exports/_fund_exports.html.haml
  30. +21 −0 app/views/exports/_level_b_exports.html.haml
  31. +18 −0 app/views/exports/_partner_organisation_exports.html.haml
  32. +3 −85 app/views/exports/index.html.haml
  33. +7 −2 app/views/shared/xml/_activity.xml.haml
  34. +1 −1 app/views/users/_form.html.haml
  35. +7 −0 bin/brakeman
  36. +3 −3 bin/rails
  37. +6 −2 bin/setup
  38. +19 −3 config/application.rb
  39. +0 −2 config/boot.rb
  40. +0 −2 config/environment.rb
  41. +17 −12 config/environments/development.rb
  42. +24 −39 config/environments/production.rb
  43. +10 −11 config/environments/test.rb
  44. +0 −2 config/initializers/assets.rb
  45. +2 −12 config/initializers/content_security_policy.rb
  46. +4 −6 config/initializers/filter_parameter_logging.rb
  47. +0 −2 config/initializers/inflections.rb
  48. +11 −9 config/initializers/permissions_policy.rb
  49. +3 −0 config/locales/default.en.yml
  50. +1 −0 config/locales/models/activity.en.yml
  51. +3 −0 config/locales/models/user.en.yml
  52. +2 −0 config/locales/views/exports.en.yml
  53. +28 −27 config/puma.rb
  54. +2 −2 config/routes.rb
  55. +5 −0 config/sidekiq.yml
  56. +14 −0 db/data/20250117151047_regenerate_otp_secrets.rb
  57. +5 −0 db/migrate/20250116172647_add_otp_secret_to_user.rb
  58. +7 −0 db/migrate/20250204092602_remove_legacy_otp_columns.rb
  59. +39 −41 db/schema.rb
  60. +63 −0 doc/architecture/decisions/0039-anonymise-users-instead-of-deleting-them.md
  61. +33 −0 doc/architecture/decisions/0040-use-sidekiq-scheduler-for-scheduled-jobs.md
  62. +20 −1 lib/notify/otp_message.rb
  63. +0 −78 lib/tasks/continuing_activities_actuals_and_forecasts.rake
  64. +13 −11 package.json
  65. +1 −1 public/robots.txt
  66. +1 −1 rollup.config.js
  67. +34 −0 spec/config/sidekiq_scheduler_spec.rb
  68. +2 −3 spec/controllers/actuals_controller_spec.rb
  69. +34 −0 spec/controllers/exports_controller_spec.rb
  70. +2 −2 spec/factories/activity.rb
  71. +2 −2 spec/factories/actual.rb
  72. +2 −2 spec/factories/report.rb
  73. +82 −0 spec/features/beis_users_can_download_exports_spec.rb
  74. +58 −0 spec/features/beis_users_can_edit_a_user_spec.rb
  75. +44 −4 spec/features/beis_users_can_invite_new_users_spec.rb
  76. +34 −14 spec/features/beis_users_can_view_an_activity_as_xml_spec.rb
  77. +1 −1 spec/features/users_can_edit_an_activity_spec.rb
  78. +31 −0 spec/features/users_can_upload_activities_spec.rb
  79. +2 −0 spec/fixtures/csv/valid_ispf_oda_activities_upload_with_duplicate_pipe_items.csv
  80. +7 −33 spec/helpers/activity_helper_spec.rb
  81. +56 −0 spec/jobs/anonymise_deactivated_users_job_spec.rb
  82. +2 −0 spec/policies/forecast_policy_spec.rb
  83. +57 −0 spec/presenters/activity_csv_presenter_spec.rb
  84. +1 −3 spec/rails_helper.rb
  85. +54 −0 spec/services/activity/import_spec.rb
  86. +224 −0 spec/services/export/activities_level_b_spec.rb
  87. +0 −119 spec/services/export/continuing_activities_spec.rb
  88. +2 −0 spec/support/sidekiq.rb
  89. +1 −1 spec/validators/date_not_in_future_validator_spec.rb
  90. +1 −1 spec/validators/date_within_boundaries_validator_spec.rb
  91. +881 −1,163 yarn.lock
6 changes: 6 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -21,3 +21,9 @@ NOTIFY_KEY=
NOTIFY_WELCOME_EMAIL_TEMPLATE=b1282182-887e-4c8a-8a39-649c9215cd41
NOTIFY_VIEW_TEMPLATE=b541df04-add8-458e-a7d3-2e156386e150
NOTIFY_OTP_VERIFICATION_TEMPLATE=1a832f2e-b13b-47f0-b32a-9cd6672364d2
# Set to 1 to send to Rails log in development such that we can test OTP flow in a browser without having to
# be added to the team-only Notify account or involve a mobile
NOTIFY_OTP_TO_LOG=1
ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY=yO1HDsDP6Eu5y7zkgqD97T6w5U4xmhH2
ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY=AS3X6Ikv2qCawCIYKJpIe5NHJXFaYLg3
ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT=gCtDin0pxDs3jE6OyzC1oTooNa0YICcF
3 changes: 3 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
@@ -13,3 +13,6 @@ REDIS_URL=redis://localhost:6379
SECRET_KEY_BASE=abcdefghijklmnopqrstuvwxyz12345678
NOTIFY_VIEW_TEMPLATE=b541df04-add8-458e-a7d3-2e156386e150
NOTIFY_OTP_VERIFICATION_TEMPLATE=1a832f2e-b13b-47f0-b32a-9cd6672364d2
ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY=yO1HDsDP6Eu5y7zkgqD97T6w5U4xmhH2
ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY=AS3X6Ikv2qCawCIYKJpIe5NHJXFaYLg3
ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT=gCtDin0pxDs3jE6OyzC1oTooNa0YICcF
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.3.6
3.4.1
83 changes: 81 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -4,6 +4,75 @@

[Full changelog][unreleased]

- Remove the supporting code for the one-off data migration related to the new DSIT transparency identifier (rake task and continuing/non-continuing activities exports)

## Release 173 - 2025-02-13

[Full changelog][173]

- Upgrade to Rails 8.0.1
- Upgrade to Ruby 3.4.1

## Release 172 - 2025-02-13

[Full changelog][172]

- Upgrade to Rails 7.2, including defaults and deprecation removals

## Release 171 - 2025-02-12

[Full changelog][171]

- Show a warning when a user not from DSIT/ODA Management is being assigned to
DSIT

## Release 170 - 2025-02-11

[Full changelog][170]

- Fix IATI XML export countries where there is only one benefitting country
- Level B export dynamic budget columns

## Release 169 - 2025-02-10

[Full changelog][169]

- Migrate to Rails 7.1 defaults
- Update IATI XML export benefitting countries into single region

## Release 168 - 2025-02-10

[Full changelog][168]

- Upgrade to Rails 7.1 with 7.0 defaults

## Release 167 - 2025-02-06

[Full changelog][167]

- Fix Level B activities export organisation name

## Release 166 - 2025-02-05

[Full changelog][166]

- Anonymise users background job
- Devise two-factor-auth 4.x -> 5.x cleanup
- Export Level B activities fixes (part one)

## Release 165 – 2025-02-03

[Full changelog][165]

- Upgrade Devise two factor gem from 4.x to 5.x

## Release 164 – 2025-01-30

[Full changelog][164]

- Fix: duplicate countries allowed on import
- Export level B activities per fund (controlled by Rollout)

## Release 163 – 2025-01-23

[Full changelog][163]
@@ -1786,8 +1855,18 @@
- Planned start and end dates are mandatory
- Actual start and end dates must not be in the future

[unreleased]: https://github.com/UKGovernmentBEIS/beis-report-official-development-assistance/compare/release-163...HEAD
[162]: https://github.com/UKGovernmentBEIS/beis-report-official-development-assistance/compare/release-162...release-163
[unreleased]: https://github.com/UKGovernmentBEIS/beis-report-official-development-assistance/compare/release-173...HEAD
[173]: https://github.com/UKGovernmentBEIS/beis-report-official-development-assistance/compare/release-172...release-173
[172]: https://github.com/UKGovernmentBEIS/beis-report-official-development-assistance/compare/release-171...release-172
[171]: https://github.com/UKGovernmentBEIS/beis-report-official-development-assistance/compare/release-170...release-171
[170]: https://github.com/UKGovernmentBEIS/beis-report-official-development-assistance/compare/release-169...release-170
[169]: https://github.com/UKGovernmentBEIS/beis-report-official-development-assistance/compare/release-168...release-169
[168]: https://github.com/UKGovernmentBEIS/beis-report-official-development-assistance/compare/release-167...release-168
[167]: https://github.com/UKGovernmentBEIS/beis-report-official-development-assistance/compare/release-166...release-167
[166]: https://github.com/UKGovernmentBEIS/beis-report-official-development-assistance/compare/release-165...release-166
[165]: https://github.com/UKGovernmentBEIS/beis-report-official-development-assistance/compare/release-164...release-165
[164]: https://github.com/UKGovernmentBEIS/beis-report-official-development-assistance/compare/release-163...release-164
[163]: https://github.com/UKGovernmentBEIS/beis-report-official-development-assistance/compare/release-162...release-163
[162]: https://github.com/UKGovernmentBEIS/beis-report-official-development-assistance/compare/release-161...release-162
[161]: https://github.com/UKGovernmentBEIS/beis-report-official-development-assistance/compare/release-160...release-161
[160]: https://github.com/UKGovernmentBEIS/beis-report-official-development-assistance/compare/release-159...release-160
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ------------------------------------------------------------------------------
# base
# ------------------------------------------------------------------------------
FROM ruby:3.3.6 AS base
FROM ruby:3.4.1 AS base

ARG RAILS_ENV
ARG NODE_MAJOR
10 changes: 6 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ ruby File.read(".ruby-version").strip
gem "acts_as_tree"
gem "addressable"
gem "audited", "~> 5.4"
gem "aws-sdk-s3", "~> 1.178"
gem "aws-sdk-s3", "~> 1.180"
gem "bootsnap", ">= 1.1.0", require: false
gem "cssbundling-rails", "~> 1.4"
gem "csv-safe"
@@ -25,10 +25,10 @@ gem "nanoid"
gem "notifications-ruby-client"
gem "parser"
gem "pry-rails"
gem "puma", "~> 6.5"
gem "puma", "~> 6.6"
gem "pundit"
gem "rollbar"
gem "rails", "~> 7.0"
gem "rails", "~> 8"
gem "rack-attack"
gem "rollout"
gem "rollout-ui"
@@ -42,6 +42,7 @@ gem "wicked"
gem "strip_attributes"
gem "breadcrumbs_on_rails"
gem "sprockets-rails"
gem "sidekiq-scheduler"

# Authentication
gem "devise"
@@ -83,7 +84,8 @@ group :test do
gem "rails-controller-testing"
gem "shoulda-matchers"
gem "selenium-webdriver"
gem "webmock", "~> 3.24"
gem "super_diff"
gem "webmock", "~> 3.25"
end

group :production do
Loading