Page MenuHomePhabricator

Automatically populate created date on relationships
Closed, ResolvedPublic

Description

Let's add automatically populated 'created_date' and 'modified_date' fields on relationships that act like the ones on activities. This could be useful to all CiviCRM users, not just WMF, so we can make the change in Civi core. Here's the upstream change proposal, with a comment in favor: https://lab.civicrm.org/dev/core/-/issues/2938

This ticket originally requested to make the start_date automatically set to the date of the relationship's creation in the database, but since start_date has a specific meaning it feels better to add these new columns.

Event Timeline

DStrine triaged this task as Medium priority.Dec 3 2021, 5:19 PM
DStrine renamed this task from Automatically populate start date on relationships to Automatically populate created date on relationships.Jan 10 2022, 9:44 PM
DStrine moved this task from Triage to Sprint +2 on the Fundraising-Backlog board.
DStrine moved this task from Sprint +2 to Sprint +1 on the Fundraising-Backlog board.

I have done some work upstream to get 2 new fields added to core for this table - created date & modified date - these are maintained using mysql & will be added when we update to 5.47 in the near future. They haven't been added to the UI yet (which should be done in core).

https://lab.civicrm.org/dev/core/-/issues/2938

Sorry for not updating the ticket earlier!

Change 762973 had a related patch set uploaded (by Eileen; author: Eileen):

[wikimedia/fundraising/crm@master] Update extendedreports

https://gerrit.wikimedia.org/r/762973

Change 762973 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Update extendedreports

https://gerrit.wikimedia.org/r/762973

Change 769145 had a related patch set uploaded (by Eileen; author: Eileen):

[wikimedia/fundraising/crm/civicrm@master] Add created & modified dates to relationhsip view

https://gerrit.wikimedia.org/r/769145

Change 769145 merged by jenkins-bot:

[wikimedia/fundraising/crm/civicrm@master] Add created & modified dates to relationhsip view

https://gerrit.wikimedia.org/r/769145

Relationships now have an automaticly populated created_date & modified_date - this is visible on the relationship view screen & in search kit now

DStrine set Final Story Points to 2.

Change 778344 had a related patch set uploaded (by Ejegg; author: Eileen):

[wikimedia/fundraising/crm/civicrm@master] Add created & modified dates to relationhsip view

https://gerrit.wikimedia.org/r/778344

Change 778344 merged by Ejegg:

[wikimedia/fundraising/crm/civicrm@master] Add created & modified dates to relationhsip view

https://gerrit.wikimedia.org/r/778344