Skip to content

Make Relationship Status Dependent On Dates

Overview

This pr changes relationship saving logic in a way that relationship will only be valid if it has valid dates otherwise it will be disabled. This pr also renames and extends disable_expired_relationships job. Now this job also looks for relationships whose start date matches today's date but it is disabled and changes the status for these relationships to active.

Before

Previously no matter what dates has been selected a relationship was always marked as active when it was being created.

Technical Details

  • This pr changes the create function in Relationship Bao file to set the relationship as disabled if it does not have valid dates.
  • This pr also changes civicrm_api3_job_disable_expired_relationships function which was executed by disable expired relationship job.
  • This pr also adds upgraders to rename the disable expired relationship job to Enable disable relationships.
Edited by shahrukh_compucorp

Merge request reports