Calendar Should an Event Edit trigger it as a New Event?

Mouth

Well-Known Member
v1.0.3a When editing an existing event, it's then triggered as a New Event ( /find-new/calendar-events ).

Is this the expected/desired use case? I would think it should be only be flagged as new if its been created since last visit, not edited too (edit notification would come to those that liked or watched the event). Thoughts?
 
Upvote 0

Freelancer

Well-Known Member
Bob does have different stages for his add-ons. There is “New” for freshly created items and “updated” for updated items.

I would recommend that simple edits of events do not flag them as new. Include a checkmark in the edit form above the save button “post as update”. Then make a different class for updated events.

Like with Bobs add-ons please include an automatic post in the event thread saying something like “User XYZ has updated event ABC”.
 

Mouth

Well-Known Member
Users are finding it confusing and annoying. Having an edit event trigger as a new event will just mean the new event function/highlight will be ignored. Please adjust it to only newly created events :)

Likes/Follows/RSVP users can get alerts for edited events.
 
Last edited:

Mouth

Well-Known Member
@NixFifty, in which file would I find the code/sql for the new events trigger? Users are *really* not liking it, and I'd like to comment it out.
 

NixFifty

Administrator
Staff member
@NixFifty, in which file would I find the code/sql for the new events trigger? Users are *really* not liking it, and I'd like to comment it out.
I should have a proper update out to change the behaviour in the next day or two but for now, you can do this:

Open library/NixFifty/Calendar/Model/Event.php and find the following around line ~709:
PHP:
$event = $this->isUnreadNewUpdated($event);
Replace it with this:
PHP:
$event['isNew'] = $this->isNew($event);
 

Mouth

Well-Known Member
I should have a proper update out to change the behaviour in the next day or two but for now, you can do this:

Open library/NixFifty/Calendar/Model/Event.php and find the following around line ~709:
PHP:
$event = $this->isUnreadNewUpdated($event);
Replace it with this:
PHP:
$event['isNew'] = $this->isNew($event);
Terrific, thanks!
 

Mouth

Well-Known Member
Replace it with this:
Not working. An event was edited after I made the code change, and still appeared as a new event.

Code:
library/NixFifty/Calendar/Model$ ls -l
total 176
-rw-r--r-- 1 root root  5505 Jul  3 11:01 Attachment.php
-rw-r--r-- 1 root root 23793 Jul  3 11:01 Calendar.php
-rw-r--r-- 1 root root 88838 Jul  6 17:28 Event.php
-rw-r--r-- 1 root root 19295 Jul  3 11:01 Field.php
-rw-r--r-- 1 root root  3572 Jul  3 11:01 Importers.php
drwxr-xr-x 2 root root  4096 Jul  2 11:01 InlineMod
-rw-r--r-- 1 root root  8262 Jul  3 11:01 Response.php
-rw-r--r-- 1 root root  9637 Jul  3 11:01 Thread.php
-rw-r--r-- 1 root root  2467 Jul  3 11:01 User.php
... 17:28 for the code change.

Screen Shot 2018-07-07 at 01.23.42.png
... new event shown.

Screen Shot 2018-07-07 at 01.26.25.png
... edited after the code change.
 

NixFifty

Administrator
Staff member
Not working. An event was edited after I made the code change, and still appeared as a new event.

Code:
library/NixFifty/Calendar/Model$ ls -l
total 176
-rw-r--r-- 1 root root  5505 Jul  3 11:01 Attachment.php
-rw-r--r-- 1 root root 23793 Jul  3 11:01 Calendar.php
-rw-r--r-- 1 root root 88838 Jul  6 17:28 Event.php
-rw-r--r-- 1 root root 19295 Jul  3 11:01 Field.php
-rw-r--r-- 1 root root  3572 Jul  3 11:01 Importers.php
drwxr-xr-x 2 root root  4096 Jul  2 11:01 InlineMod
-rw-r--r-- 1 root root  8262 Jul  3 11:01 Response.php
-rw-r--r-- 1 root root  9637 Jul  3 11:01 Thread.php
-rw-r--r-- 1 root root  2467 Jul  3 11:01 User.php
... 17:28 for the code change.

View attachment 834
... new event shown.

View attachment 835
... edited after the code change.
Annoyingly, IIRC there’s another place where it gets checked that I probably forgot about. I’ll be home in a short while and will drop the update that tweaks the logic for this. Sorry about that!
 
Top