samvera / hyrax

Hyrax is a Ruby on Rails Engine built by the Samvera community. Hyrax provides a foundation for creating many different digital repository applications.
http://hyrax.samvera.org/
Apache License 2.0
184 stars 124 forks source link

Corrects the sharing of predicates between date_created and created_at. #6866

Closed bwatson78 closed 1 month ago

bwatson78 commented 2 months ago

Summary

Corrects the sharing of predicates between date_created and created_at.

Type of change (for release notes)

@samvera/hyrax-code-reviewers

github-actions[bot] commented 2 months ago

Test Results

    17 files  +  1      17 suites  +1   2h 17m 33s :stopwatch: + 11m 55s  6 705 tests +139   6 408 :white_check_mark: +141  297 :zzz:  - 1  0 :x:  - 1  13 178 runs  +979  12 783 :white_check_mark: +972  395 :zzz: +8  0 :x:  - 1 

Results for commit 9c3be464. ± Comparison against base commit 4b749589.

This pull request removes 257 and adds 396 tests. Note that renamed tests count towards both. ``` spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create # spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create # spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create # spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create # spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy AdminSet: 4be5877a-4614-4181-b9c1-8e456d6466d6 spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy Hyrax::AdministrativeSet: 87b5a23b-f0e4-4c3d-8f71-ac8a60add89d spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to edit AdminSet: 3458d59b-b8a7-49bf-8062-b6e4066dac67 spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to edit Hyrax::AdministrativeSet: 051a8d99-ce8a-4d79-af28-6386cd98f239 spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to update AdminSet: cf1fc3df-a2a3-4259-945d-d73a34fb51b5 spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to update Hyrax::AdministrativeSet: d4783baa-1c4b-496c-8732-34a7f0fa6335 … ``` ``` spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create # spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create # spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create # spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create # spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy AdminSet: 52f21314-94b6-4405-9a32-7c023d39816f spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy Hyrax::AdministrativeSet: ee6dcc60-f2e4-4fab-af1d-39cda90907d6 spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to edit AdminSet: 0834f576-900c-4f25-831f-6c5fd479efdb spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to edit Hyrax::AdministrativeSet: a3bd7ae0-d396-4263-af1e-d6a266c17bf9 spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to update AdminSet: 0dcedd29-ebbb-40ca-b8aa-9565c283c8b0 spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to update Hyrax::AdministrativeSet: 75d06bd3-f5d4-4c38-89ba-898a88db597c … ```

:recycle: This comment has been updated with latest results.

orangewolf commented 2 months ago

@bwatson78 code seems good there. My question to you is what kind of change is it? If you have existing records, does changing this predicate break things? Specifically if I have data in created at and then change the predicate, what happens the next time I open that record? Do we need a data migration of some sort here?