- Issue created by @Nathan Tsai
- @nathan-tsai opened merge request.
- 🇨🇦Canada Nathan Tsai
Just add a patch generated from the merge request after the 5th commit:
https://git.drupalcode.org/project/views_arg_entity_field/-/merge_reques...
- 🇨🇦Canada Nathan Tsai
Note: it might also be useful to use the Drupal 9 patch here: 🐛 Fix label token replacement for views entity reference arguments Fixed so that entity ids are shown using their labels.
"patches": { "drupal/views_arg_entity_field": { "#3364511: Support Current User field": "https://www.drupal.org/files/issues/2023-06-02/3364511-support-current-user-fields-3.patch" }, "drupal/core": { "#2640994: Show entity labels instead of ids (for Announcements)" : "https://www.drupal.org/files/issues/2022-09-24/2640994-137.patch" } },
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 7:35pm 2 June 2023 - 🇨🇦Canada Nathan Tsai
Addresses: 🐛 NULL value should be empty string Postponed: needs info
- Status changed to Needs work
11 months ago 4:29pm 24 January 2024 - 🇷🇺Russia zniki.ru
I checked MR, and changes is not so big.
But there are a lot places with code duplication, so I will set status to NW.I have several ideas how to refactor the code:
1) Add "Current user" for$form['entity_type_id']
.
2) Extends CurrentUserFieldValue from CurrentEntityFieldValue.
3) Create common abstract class for CurrentEntityFieldValue, CurrentUserFieldValue.Only thing I am not sure is views caching.
- 🇷🇺Russia zniki.ru
Added branch 3364511-refactor just as prototype. Not finished.
- Status changed to Active
8 months ago 6:27pm 19 April 2024 - 🇷🇺Russia zniki.ru
I was searching how to improve solution and I found that there is a module with just exact functionality:
Views user field value contextual filter [user_field_value] →And there are more modules that also introduce some nice features, like token support for views default value:
- https://www.drupal.org/project/user_field_value →
- https://www.drupal.org/project/views_argument_token →
- https://www.drupal.org/project/views_extras →
- https://www.drupal.org/project/views_arg_entity_field →
Maybe we can combine these modules?
Let's have discussion before we continue to work on this feature request.