Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup following smart group conversions and fix the old name of the… #15648

Merged

Conversation

seamuslee001
Copy link
Contributor

… relationship date relative fields for conversion and add a unit test

Before

No unit test on the relationship conversion

After

Unit test

Technical Details

The unit test was mostly built off the smart group values found here #15637 (comment) with the field names already re-worked

@civibot
Copy link

civibot bot commented Oct 29, 2019

(Standard links)

@civibot civibot bot added the master label Oct 29, 2019
@@ -540,9 +540,6 @@ public static function relationship(&$form) {
}
CRM_Core_Form_Date::buildDateRange($form, 'relation_active_period_date', 1, '_low', '_high', ts('From:'), FALSE, FALSE);

// Add reltionship dates
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't see this field exposed at all on the form so lets bin it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eileenmcnaughton looks like this is when the relation_date field was stripped off the form ad68213#diff-0ac8fd8c66c6d1e69b6dafa540ecddbf

@eileenmcnaughton
Copy link
Contributor

OK- I feel like we reached agreement that relation_date didn't do much - so this looks good to me

@eileenmcnaughton
Copy link
Contributor

@seamuslee001 fail relates

… relationship date relative fields for conversion and add a unit test
@seamuslee001 seamuslee001 force-pushed the relationship_date_cleanup_fixes branch from 434e025 to 0d679de Compare October 29, 2019 02:50
@seamuslee001
Copy link
Contributor Author

@eileenmcnaughton i have fixed the test but can you check your ok with the test fix?

@eileenmcnaughton
Copy link
Contributor

So why did the participant field need to come out?

@seamuslee001
Copy link
Contributor Author

@eileenmcnaughton AFAIK it has already been converted to datepicker so why should we keep it in?

@eileenmcnaughton
Copy link
Contributor

Ok per discussion on chat this seems fine - we are removing the ability to do weird saving except for our 3 remaining fields

@eileenmcnaughton eileenmcnaughton merged commit 6774f03 into civicrm:master Oct 29, 2019
@seamuslee001 seamuslee001 deleted the relationship_date_cleanup_fixes branch October 29, 2019 04:38
*/
public static function saveRelativeDates(&$queryParams, $formValues) {
// This is required only until all fields are converted to datepicker fields as the new format is truer to the
// form format and simply saves (e.g) custom_3_relative => "this.year"
$relativeDates = ['relative_dates' => []];
$specialDateFields = [
'event_relative',
'participant_relative',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this list (now of only 3 fields) is the list of legacy fields

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants