- 🇭🇺Hungary huzooka Hungary 🇭🇺🇪🇺
Unfortunately it is only by the field widget. If the widget wasn't displayed, the Radioactivity entity won't be created.
My team also has this problem.
- Assigned to huzooka
- @huzooka opened merge request.
- Merge request !6Issue #3325229: Radioactivity not set when creating nodes in code → (Open) created by huzooka
- Issue was unassigned.
- Status changed to Needs review
about 2 years ago 11:02am 5 February 2023 - 🇭🇺Hungary huzooka Hungary 🇭🇺🇪🇺
I was able to keep all the necessary changes inside the
RadioactivityReferenceItem
field type class. I added a functional test to prove that the changes I have done do not break the functionality provided by theradioactivity_reference
field widget. Maybe on the next major version bump, the Radioactivity entity specific parts could be cleaned up from the widget's class.RadioactivityReferenceFieldTypeTest
tests quite lot cases:- Create entities with or without energy.
- How the field type behaves if it is attached to a translatable entity.
- What happens if the entity is translatable, but the Radioactivity field is not translatable
Imho this is ready for review.
I also attach a patch file which only contains the actual fix. Please keep in mind that this patch file represents the fix in MR-6 at b62ff2f1
- Assigned to huzooka
- Status changed to Needs work
about 2 years ago 3:37pm 6 February 2023 - 🇭🇺Hungary huzooka Hungary 🇭🇺🇪🇺
The MRs and the patch I added are very wrong. The field shouldn’t make any assumptions based on the target ID value!
- Issue was unassigned.
- Status changed to Needs review
about 2 years ago 8:45pm 6 February 2023 - 🇭🇺Hungary huzooka Hungary 🇭🇺🇪🇺
Okay, now it should be fine!
Fix-only patch attached.
- 🇭🇺Hungary huzooka Hungary 🇭🇺🇪🇺
Attaching the most recent fix-only patches.
- last update
12 months ago 84 pass, 2 fail - First commit to issue fork.
- last update
12 months ago 84 pass, 2 fail The last submitted patch, 12: radioactivity-move_entity_management_from_field_widget_to_entity_level-3325229-11--complete.diff, failed testing. View results →
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.- 🇮🇳India prem suthar Ahemdabad- Gujrat , Jodhpur - Rajsthan
prem suthar → made their first commit to this issue’s fork.
- 🇮🇳India prem suthar Ahemdabad- Gujrat , Jodhpur - Rajsthan
@tr raised the mr as per the #15 so please review.
- 🇺🇸United States tr Cascadia
Thanks for helping out!
This is my first time looking at this patch. In general I'm in favor of this change, and I agree that the entities should be managed in the field type, not in the widget. I especially like all the new tests - that really helps to define the expected behavior of this code and ensure that we don't break the expected behavior with future changes to the codebase.
But now that all the module tests for 4.1.x branch are passing, I want to make sure we don't introduce new test failures with this MR. So what I would like to see here is to have all the test warnings/errors/failures fixed in the MR before I do a detailed review and commit this. Can you work on the MR to fix the problems with the tests?