- 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 RTBC 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
about 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
5 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
2 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.