Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Currently user relations page duplicates all user relations in both 'active' and 'inactive' lists. Attached patch fixes this problem. It add 'status' field to crm_core relations and modify default view to filter relations properly.
Comment | File | Size | Author |
---|---|---|---|
#3 | crm_core-add_status_to_relationships-1908306-3.patch | 30.22 KB | RoSk0 |
add_status_to_crm_core_relations.patch | 27.49 KB | RoSk0 |
Comments
Comment #1
dealancer CreditAttribution: dealancer commentedIn general it looks and works good, but there is some minor and important things to do:
* right now field_crm_relation_status is not blocked so it is impossible to delete it. Please look on how crm_core_participants in activity field are implemented, which makes them blocked, hence impossible to delete.
* Name field_crm_relation_status is not so good. It is better to have field_relationship_status, field_crm_core_relationship_status, as we use relationship term for relations between contacts.
* Switching of active or inactive seems to be not so easy for user (http://awesomescreenshot.com/098w38jd1). We need to find better way to do it.
Also some minor things:
Can we add space character between 't' and '('. and let's replace 'Human' on 'Human readable'.
Related Contact (Table) sounds better.
Comment #2
dealancer CreditAttribution: dealancer commentedThinking about how UI should be done there are different possibilities:
A) User sees Activate or Deactivate link, when clicking on this link relationship status is updated and the row in the table moves from Inactive table into active table (or vice verse).
B) User sees Activate or Deactivate link, when clicking on it, relationship is updated, however the row in the table does not move into other table, but user sees Undo activation (or just deactivate), or Undo deactivation (or just activate) link.
C) Users sees separate column with a checkbox for activation or deactivation (save button is not shown) - the most easy way to do, as we can hide save button by changing editable fields settings.
D) We can use VBO instead.
Comment #3
RoSk0Renamed "status" field. Removed "editablefields" from dependencies. Created custom form to toggle relationship status and modified relationships view accordingly.
Comment #4
dealancer CreditAttribution: dealancer commentedLooks great, ready for committing.
Comment #5
dealancer CreditAttribution: dealancer commentedLooks great, ready for committing.
Comment #6
dealancer CreditAttribution: dealancer commentedComment #7
RoSk0Commited in 7d9e50e.