Closed tn3rb closed 4 years ago
I just tested this branch with the following data in ChromeiQL but got some PHP errors.
mutation CREATE_RECURRENCE($input: CreateEspressoRecurrenceInput!) {
createEspressoRecurrence(input: $input) {
espressoRecurrence {
id
dbId
cacheId
exDates
exRule
dateDuration
name
rDates
rRule
}
}
}
with these query variables
{
"input": {
"name": "every January on the 1st for 1 time",
"clientMutationId": "ok",
"rRule": "DTSTART:20201006T115805Z\nRRULE:FREQ=YEARLY;BYMONTH=1;BYMONTHDAY=1;COUNT=1;WKST=MO",
"exRule": "DTSTART:20201006T115837Z\nRRULE:FREQ=YEARLY;BYMONTH=1;BYMONTHDAY=1;COUNT=1;WKST=MO",
"dateDuration": "1",
"rDates": "[]"
}
}
Do we want to keep gDates in the database?
that was removed in this commit: https://github.com/eventespresso/eea-recurring-events-manager/pull/28/commits/787f8d8ef02f3de6ee21058f9eb633bc906faef7
DOM data for REM needs to be wired up. May in next PR if now this.
yes another PR
I just tested this branch with the following data in ChromeiQL but got some PHP errors.
can you post the errors plz in case I don't get them?
WordPress database error Unknown column 'RCR_date_duration' in 'field list' for query INSERT INTO
`wp_esp_recurrence` (`RCR_name`, `RCR_rRule`, `RCR_exRule`, `RCR_rDates`, `RCR_date_duration`, `RCR_sales_start_offset`,
`RCR_sales_end_offset`) VALUES ('some r rule name', 'STRART:NULL', 'OKTEST', '[]', '1', '1 month before start', '1 hour before start')
WordPress database error Unknown column 'wp_esp_datetime' in 'where clause' for query SELECT COLUMN_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE table_name = `wp_esp_datetime`
AND column_name = 'RCR_ID';
Method generatedDatesJson on class EE_Recurrence does not exist! You can create one with the following code in functions.php or in a plugin: add_filter('FHEE__EE_Recurrence__generatedDatesJson','
ie: try de-re-activating the REM plugin so that the DMS can run. if that doesn't work, then delete the recurrence table and manually remove the RCR_ID field from the datetimes table, then try de-re-activating again
The last error is not a DB error 🙄
looks like I forgot to remove the GQL field from \EventEspresso\RecurringEvents\domain\services\graphql\types\Recurrence::getFields()
my IDE didn't detect that since the method is only referenced via a string and not directly in any way:
new GraphQLField(
'gDates',
'String',
'generatedDatesJson',
esc_html__('Generated Dates', 'event_espresso')
),
FINALLY got the ^%$#%^$#$#^ tests to run properly on Travis!!!
only have a couple of super basic tests so far but at least they are running now
This PR:
adds PHP models and classes for
Recurrence entity
Recurrence datetime relation
DMS (data migration script) for:
adding new Recurrence table and
adding foreign key field to datetime table
adds all GQL classes required for the above new entity and relation