Open jojo12 opened 1 month ago
Draft
I think that the recurrence process needs a revision. I could upload a new branch about recurrence (improvement & review setting).
For example, in the next commit (see below, test it, but allow me some minutes to finish):
The new branch could include an internal review of the recurrence process:
Update the content of all events (inherited) if recurrence options and dates don't change.
What do you think?
The current shield is 60 days for all recurrence types, and all recurrence events with date > now+ 60 days aren't created in the events table.
I have to add a extension of shield for each type of recurrence in the JEM Setting -> Global Parameters ->Recurrence Events:
So, each one has the number of months for shield. Shield is a limit date because JEM should not create events ad infinity and beyond. The admin can change the default values for each shield.
Update the commit with new icon to edit the root event of serie (only for recurrence events).
Now, when the recurrence event is edited, JEM shows a mesage:
This event is the first one of a set of recurring events. If you save this event, the set will be dissolved, even if you just save it without editing at all.
If you choose any recurrence in this event, a new set of recurring events will be created.
It always happens when saving the event.
The guestions, always? Imagine.. If we have a recurring event and we edit the first event (root), we do not need to delete all the recurring events in the series (dissolved), in the case of changing data that does not affect the recurrence (type, number, end date), it is possible to update all recurring events with the changed data, as long as the events continue to inherit from the root event.
For example, if the
It's better to update the events in the recurring series rather than delete them to create updated ones, for one main reason: the generated IDs, especially if they are shared via email and social networks.
When an event in the series that is not the first one (non-root) is edited, that event is saved as updated without the root, becoming independent. Therefore, if changes are made to the root event, it will no longer be updated as it has lost the inheritance from the series.
This is a proposal to improve the editing of recurring events and maintain the inheritance of many data points of the event in the generated series.
With this last commit, the recurrence is generated correctly, but the editing of the series needs review too and others improvements. To achieve this, the first element (root event) must be edited.
If any of the following data are changed in the first event:
start date end date recurrence type (daily, weekly, monthly, weekday, yearly) repeating every (number) recurrence counter (until date) The root event will be updated, the entire previous series will be deleted, and a new one will be generated based on the saved data.
What do you think about the proposed revision of the recurrence? Is it consistent with its use?
@jojo12 Maybe we need to change the title of the issue This is going to be broader than just adding a birthday :-) EDIT Jojo: this was the posters proposal!
I don't understand all. Meanwhile I was used to proced as follows: I start creating an event, then I review it, if it is complete or to correct it, then I open again and choose recurrence, then I trigger it, Then I must have the possibility to edit a single following event (because there may be single changes. There is an other mentionned problem: Is the eventregistration for the whole recurrence, or only for each event separately?
"There is an other mentionned problem: Is the eventregistration for the whole recurrence, or only for each event separately? Now, the registration is for each event. The registration process doesn't see the concurrence serie.
Good point, I have to think how to do it. I'll make a note of that.
I have updated the last commit to add the new edit icon in the legacy layout.
An example regarding your question. I create an event for a course that will be held on the next 4 Fridays, but the registration in this case is unified, you only have to register once for the course, and it reserves a spot for all 4 Fridays. Is it right?
@jojo12 What number have you in JEM Setting -> Global Parameters ->Recurrence Events:? By default, they will be ->
Check them. I think that these fields are empty or don't create, if it's so, you need to update the _jem_config table with SQL file admin/sql/updates/mysql/4.2.3.sql This SQL file is in the commit, run to mysql.
Sorry, Marcos, I have a cold and I am after all in bed. I installed your review as package and I can create and edit events. Will continue to test when I stay better.
No problems, no rush, you have to recover first.
ALPHA 2 version: New option 'bookedrootevent" in the event table. This field is for registration setting, if it's set (value =1), indicates that the booking places is in the root event of series and for all events of serie (recurrence events with that root ID). In this commit, this field is saved in the table for all events, and it can be edited.
FE:
BE:
Coming soon, beta 1 version with registration process users.
If you apply the last commit, remember to run the sql files.
I zipped in the branch the com_jem and installed. But then in admin I can create events, but I can't see them in frontend. But the setting look like you describe, I will retry later.
when I install the zipped com_jem from recurrence_review, I get Warnung JInstaller: :Install: SQL-Fehler Unknown column 'ujrfe_jem_config.keyname' in 'where clause' Is this your db?
I deleted the first line in 4.2.3.sql then installation worked.
But when trying to open a new event in backend, I get
0 Failed to parse time string (now + month) at position 4 (+): Unexpected character
2 | DateTime->construct() | JROOT\libraries\src\Date\Date.php:126 3 | Joomla\CMS\Date\Date->construct() | JROOT\administrator\components\com_jem\views\event\tmpl\edit.php:396 4 | include() | JROOT\libraries\src\MVC\View\HtmlView.php:416 5 | Joomla\CMS\MVC\View\HtmlView->loadTemplate() | JROOT\libraries\src\MVC\View\HtmlView.php:204 6 | Joomla\CMS\MVC\View\HtmlView->display() | JROOT\administrator\components\com_jem\classes\admin.view.class.php:29 7 | JemAdminView->display() | JROOT\administrator\components\com_jem\views\event\view.html.php:81 8 | JemViewEvent->display() | JROOT\libraries\src\MVC\Controller\BaseController.php:697 9 | Joomla\CMS\MVC\Controller\BaseController->display() | JROOT\administrator\components\com_jem\controller.php:51 10 | JemController->display() | JROOT\libraries\src\MVC\Controller\BaseController.php:730 11 | Joomla\CMS\MVC\Controller\BaseController->execute() | JROOT\administrator\components\com_jem\jem.php:54 12 | require_once() | JROOT\libraries\src\Dispatcher\LegacyComponentDispatcher.php:71 13 | Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher{closure}() | JROOT\libraries\src\Dispatcher\LegacyComponentDispatcher.php:73 14 | Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch() | JROOT\libraries\src\Component\ComponentHelper.php:361 15 | Joomla\CMS\Component\ComponentHelper::renderComponent() | JROOT\libraries\src\Application\AdministratorApplication.php:150 16 | Joomla\CMS\Application\AdministratorApplication->dispatch() | JROOT\libraries\src\Application\AdministratorApplication.php:195 17 | Joomla\CMS\Application\AdministratorApplication->doExecute() | JROOT\libraries\src\Application\CMSApplication.php:306 18 | Joomla\CMS\Application\CMSApplication->execute() | JROOT\administrator\includes\app.php:58 19 | require_once() | JROOT\administrator\index.php:32
@jojo12 What number have you in JEM Setting -> Global Parameters ->Recurrence Events:? By default, they will be ->
Check them. I think that these fields are empty or don't create, if it's so, you need to update the _jem_config table with SQL file admin/sql/updates/mysql/4.2.3.sql This SQL file is in the commit, run to mysql.
@jojo12 I think that you don't have aplied 4.2.3.sql file (run into your mysql).
what should I do with the 4.2.3.sql the first line with this error?
first I was not able to enter, Then I reinstalled the com_jem.zip with the strange line in 4.2.3.sql Then I was able to enter, but I wasn't able to check the "booked in a root event" after save, reopened and there was no check.
I have these numbers for recurrence.
You are right, the line 2 of 4.2.3.sql had the sufix joomla. I already solve it. Now, you can run this file in mysql by phpmyadmin. Check in your _jem_config table these fields:
The values in image capture are test values (by default are 3,60,12,180)
I have testing in other languages, I will try to simulate the error, but the code doesn't read these numbers. Send me a capture of your event (recurrence and registration setting).
in frontend responsive event detail I get:
Warning: Undefined property: JemViewEvent::$1 in C:\xampp\htdocs\joomla\components\com_jem\views\event\tmpl\responsive\default_attendees.php on line 63
@jojo12 You have a new commit to solve it. Sorry, the call variable bookedrootevent was wrong in this view.
I have to upload the code of beta 1 with registration in the root event, but I have to finish the tests. I hope to do it this weekend.
In the design of new recurrence event, I have created a new option "Series event booking", if enabled, apply only for recurrence event. The registration is booked in all series event of recurrence from now. This new field in the event table is 'seriesbooking' ( before was named as 'bookedrootevent') as INT (4 Bytes: 00 00 00 00 = Not used - Max - Min - Type).
PROPOSAL to extender use bookedrootevent can be 3 values (type): 0: No active, each event has its registration. 1: The registration is in all recurrence events from now (upcomming events of the serie).
I'll try to dev the point 1 of this model in the beta 1 of this branch. The Max and Min values in the field, for the moment is 0 (not implemented initially, it's an idea to be more flexible in the future).
A simple example, If an event is active with seriesbooking, the users can booking all events of the serie from now for past events, no reservations are made. So, the user books in all of them.
Other example with Max y Min, the admin can create a recurrence event with 10 recurrences in the time, and set seriesbooking of type=2 with min=1 and max=2 selected events. The user can see all 10 events and in the registration form, can select in what recurrence event wants to book places with a min=1 and max=2.
UPDATED.
Hi folks, while you are reviewing the recurrence system, I have a request.
When using Weekday recurrence, there is a drop down for "repeating every" that has a list including 1-4, last, before last.
I have a need to repeat an event on the 1st, 3rd, and 5th Sundays of each month. The 5th Sunday only happens a few times during the year, and when it does the event runs two Sundays in a row. So most months there are two events and sometimes there are three events in the month.
"last" does not work for this situation.
Please add 5th weekday to the available dropdown list. This would let me create three events each with its weekday recurrence.
Ultimately, I'd like something like choose monthly and select sunday and choose 1st, 3rd, 5th all in one recurring event. If I get time, I'll see if I can submit a pull request for that once I wrap my head around the code base.
@webenhanced Here you are, in the last commit (see on the line above) is added your request. Check it and tell me if it works for you.
I installed the nightly for recurrence review (hekla did) on a localhost: when I choose "weekday" it should open a submenu, but nothing! This is a bug!
and the information in backend is bad:
@jojo2 Try it with the last commit (beta 1)
I have to do more test some combination of settings. Your advice is appreciated to improvement this feature.
Run the sql file, there is changes.
Now I don't get any event in Frontend simplelist! the rest seems good EDIT: at the moment I have not enough time to test more... will come back
I have reviewed my FE simplelist and It works (I tested it changes languages, in EN and in ES). I don't know why you don't see the event in this view. Tell me How and what version do you have installed JEM and branch?
@jojo12 I have updated the beta 1 (see last commit) Fix small bug. Update addScriptDeclaration to addInlineScript in the code (support J5 & J6). Improve style in event view (FE) for some select (hours & minutos) and input field (venues). Improve the venue modal to select a venue, now the url is complete (use uri root) and working with localhost too.
If hekla will do other night zip for this branch, and when you can, test it with a new zip (include the last commit).
There was a post who said that in our JEM documentation is written, that you can repeat events once a year. But (until now) this is not possible. Could this be a new feature?