From 08d08c035157a7b78a3af0569128c2534b2c9f64 Mon Sep 17 00:00:00 2001 From: eileen Date: Wed, 30 Oct 2019 08:28:14 +1300 Subject: [PATCH] Add uniquenames for mailing_name, mailing_job_status This is in support of https://github.com/civicrm/civicrm-core/pull/15369 Where the names in the search do not match the 'real names' we have 2 techniques 1) where adding a unique name to the schema gives a match we do that - here that is the case for mailing_name 2) otherwise we ensure the schema has a unique name if appropriate & rename the field in the upgrade scriptt In this case when we look at CRM_Mailing_BAO_Query we don't see mailing_name as present (only mailing_id which should be an entity reference field). However it is used in the confusingly-not-related Mailing search so lets rename this one at the same time. --- CRM/Mailing/DAO/Mailing.php | 4 ++-- CRM/Mailing/DAO/MailingJob.php | 4 ++-- xml/schema/Mailing/Mailing.xml | 1 + xml/schema/Mailing/MailingJob.xml | 1 + 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CRM/Mailing/DAO/Mailing.php b/CRM/Mailing/DAO/Mailing.php index 9f727b0c26..0f862dc0ec 100644 --- a/CRM/Mailing/DAO/Mailing.php +++ b/CRM/Mailing/DAO/Mailing.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Mailing/Mailing.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:aa54484f6e9b8d5ad8e75680f95cfc67) + * (GenCodeChecksum:e25bcafe5fd213c6f8204585b2d8f6c1) */ /** @@ -476,7 +476,7 @@ class CRM_Mailing_DAO_Mailing extends CRM_Core_DAO { 'localizable' => 0, 'FKClassName' => 'CRM_Mailing_DAO_MailingComponent', ], - 'name' => [ + 'mailing_name' => [ 'name' => 'name', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Mailing Name'), diff --git a/CRM/Mailing/DAO/MailingJob.php b/CRM/Mailing/DAO/MailingJob.php index 6ed6c8cb10..c1c46e83a3 100644 --- a/CRM/Mailing/DAO/MailingJob.php +++ b/CRM/Mailing/DAO/MailingJob.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Mailing/MailingJob.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:5660cdd4b71d1c0b93da6a4a1904deb2) + * (GenCodeChecksum:4c28192656647449d061e22dda8d8deb) */ /** @@ -211,7 +211,7 @@ class CRM_Mailing_DAO_MailingJob extends CRM_Core_DAO { 'formatType' => 'activityDateTime', ], ], - 'status' => [ + 'mailing_job_status' => [ 'name' => 'status', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Mailing Job Status'), diff --git a/xml/schema/Mailing/Mailing.xml b/xml/schema/Mailing/Mailing.xml index e4f8a0eaee..816e244694 100644 --- a/xml/schema/Mailing/Mailing.xml +++ b/xml/schema/Mailing/Mailing.xml @@ -120,6 +120,7 @@ name + mailing_name Mailing Name varchar 128 diff --git a/xml/schema/Mailing/MailingJob.xml b/xml/schema/Mailing/MailingJob.xml index 430d91594d..58b81ef953 100644 --- a/xml/schema/Mailing/MailingJob.xml +++ b/xml/schema/Mailing/MailingJob.xml @@ -69,6 +69,7 @@ status + mailing_job_status Mailing Job Status varchar 12 -- 2.25.1