calendar icon indicating copy to clipboard operation
calendar copied to clipboard

Feature request: show who created an event [$50]

Open ediazcomellas opened this issue 8 years ago • 32 comments

Knowing who created an event in a shared calendar would be very useful. This is information that other calendars (AKA google) show, and helps to keep things tidy and fight misuse of shared calendars.


There is a $50 open bounty on this issue. Add to the bounty at Bountysource.

ediazcomellas avatar Nov 30 '17 09:11 ediazcomellas

I feel like this is a duplicate of some other issue, but I can't find it right now.

This is generally something we would have to fix in the server. When creating a new event, the server would have to add some X-NC-Creator property.

georgehrke avatar Dec 04 '17 14:12 georgehrke

Do you mean: #486?

brunt82 avatar Dec 07 '17 12:12 brunt82

Not necessarily. Organizer implies that there are attendees. (At least that's how most clients handle it).

georgehrke avatar Dec 07 '17 12:12 georgehrke

Yes, but I meant the "Organizer"-ics-property which is used in rfc 5545 to specify the "owner" of VEVENT, VTODO and VJOURNAL regardless if the event is sent to somebody or not.

And I suppose ediazcomellas meant the same...

brunt82 avatar Dec 07 '17 12:12 brunt82

What I want is to be able to know who created the meeting when using a shared calendar. In the example, it shows the calendar "Familia" and the creator (by his name).

show_creator

ediazcomellas avatar Dec 07 '17 12:12 ediazcomellas

Yes, but most caldav clients (including the Nextcloud web calendar) only add the organizer property if there are also attendees. The "Test meeting" by @ediazcomellas will most likely not have an organizer property.

My current idea to solve this: When creating an event in a shared calendar, add a custom property to the calendar data: X-NC-CREATOR;CN=Eduardo Díaz Comellas:nextcloud://cloudid

@ediazcomellas What calendar software is this? Can you export that event as ics, open it in a text editor and post the contents here please :)

georgehrke avatar Dec 07 '17 12:12 georgehrke

@georgehrke: It seems to be Google Calender. I had the same idea as you.

It is only possible to export the whole calendar as ics. The ics starts with

BEGIN:VCALENDAR
PRODID:-//Google Inc//Google Calendar 70.9054//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:PUBLISH
X-WR-CALNAME: <creator>
X-WR-TIMEZONE:Europe/Berlin

which contains the name (="<creator>") which was displayed in the Google calendar as "creado por:" Afterwards it is following all VEVENTS of the calendar. The last one contains my just created test appointment:

BEGIN:VEVENT
DTSTART:20171207T143000Z
DTEND:20171207T153000Z
DTSTAMP:20171207T125654Z
UID:[email protected]
CREATED:20171207T125639Z
DESCRIPTION:
LAST-MODIFIED:20171207T125639Z
LOCATION:
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY:Test meeting
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR

brunt82 avatar Dec 07 '17 13:12 brunt82

Hi, Yes, that screenshot is from Google Calendar. Please beware that creator information is only shown in shared calendars. Interestingly, if you export that calendar as ics, the event only shows:

BEGIN:VEVENT DTSTART:20171207T170000Z DTEND:20171207T191500Z DTSTAMP:20171207T154639Z UID:[email protected] CREATED:20171207T154530Z DESCRIPTION: LAST-MODIFIED:20171207T154530Z LOCATION: SEQUENCE:0 STATUS:CONFIRMED SUMMARY:Test meeting TRANSP:OPAQUE END:VEVENT

With no creator information. I assume Google does not export that data.

ediazcomellas avatar Dec 07 '17 15:12 ediazcomellas

@georgehrke do you think this can be implemented? I would love to see it working in next release. Please tell me if I can help in any way.

ediazcomellas avatar Apr 17 '18 05:04 ediazcomellas

This would be a great enhancement. However, it seems like the RFC doesn't state anything about an author or creator, so, @georgehrke's idea is probably the only way, which means it will only be displayed in clients that read and expect our custom field.

Google probably uses their own custom internal storage for their ~~calendar~~ creator names and doesn't include the creator information in their ics files, because it isn't in the standard (or maybe even saved in a different location). That said, the way I see it, there's no way to make an author / creator show up in the Google calendar app. Sadly. Correct me, if I'm wrong :-)

@brunt82 When you say that the X-WR-CALNAME contained the creator of the specific event, I'm a bit confused, because that field is only visible once for the whole calendar and would not be event-specific. It should also show the name of the calendar instead of the name of the creator. Am I mistaken? Can you share another example that might make it clear?

te-online avatar Jan 21 '19 21:01 te-online

@te-online I actually changed my idea about the X-NC-CREATOR property, because it can easily be manipulated. You could create an event and spoof your identity. It should either just be a CalDAV property or we should simply use the information that's already stored in the Activity app.

edit: This will obviously not change anything about the fact, that it won't be displayed in mobile / desktop clients

georgehrke avatar Jan 21 '19 21:01 georgehrke

I can confirm the Google Event API also has the creator property as read-only. :)

tcitworld avatar Jan 21 '19 22:01 tcitworld

@georgehrke Okay, sure. Couldn't we just automatically set the X-NC-CREATOR based on whoever's account is manipulating the event? That way it couldn't be forged. Is there something I overlook?

te-online avatar Jan 22 '19 18:01 te-online

Generally speaking, manipulating calendar data in the server is bad practice. It might cause unexpected behaviour in certain clients and it will also cause more traffic, because by altering the calendar-data on the server, even clients that just created an event and have them in cache will have to refetch the entire calendar-data.

georgehrke avatar Jan 22 '19 18:01 georgehrke

That makes sense, I see 👍 Maybe then we could be fetching the information from the Activity app and maybe do so by firing an enhancing AJAX call for that information, when viewing the details of an event. However, I'm just guessing here, because I have to admit that I don't quite know how the NC calendar client works, and if there could be additional AJAX calls, once the actual caldav events are loaded.

But to get back to the sad business of negatively answering our issue opener's question, @ediazcomellas: As @georgehrke said, I think we simply cannot display author information in 3rd party apps, as long as their developers do not disclose how to provide such information to the app.

te-online avatar Jan 22 '19 18:01 te-online

Thanks for the answer. I understand that 3rd party integrations in non-standard tags is not an easy task. In any case my request was limited to knowing the creator (or the last editor) in the web calendar app.

I agree with @georgehrke about a workaround that doesn't mess with the calendar itself, as it can have implications for other integrations... As @te-online points out, the Activity app seems to be a good candidate (but I am just a user, with no knowledge of the internals, so please excuse me if what I say is fool) The main interest for me is audit: knowing the author or editor of an activity in a shared calendar. That information does not need to be propagated to 3rd party calendar clients.

ediazcomellas avatar Jan 23 '19 07:01 ediazcomellas

Thanks for clarifying @ediazcomellas

I'd really like to implement this functionality, because I'd like to see it, too.

However, I think we need a change within the activity app for this feature to work. I'd need to be able to query the activity REST API with an event-id which is currently not possible.

From looking over the activity repository real quickly, I couldn't see a straightforward way to add this kind of feature. I'll have a closer look within the next days 😉

te-online avatar Feb 02 '19 20:02 te-online

Great! Thanks for the feedback

ediazcomellas avatar Feb 02 '19 20:02 ediazcomellas

Short update: The activity app's database structure is really sub-optimal. Nevertheless, I'd vote for simply querying the JSON-string payload within the activity table by using LIKE %$eventId%. I made a proof-of-concept for an API endpoint to fetch the activity object from the database (https://github.com/te-online/calendar/commits/feature/display-event-author).

Todo:

  • [x] Proof-of-concept for API endpoint for activity details in calendar app
  • [ ] Refactor API controller to query database in a safer way / fallback for when activity app is not installed
  • [ ] Add frontend JS to send ajax request when opening event details to fetch activity item (I'll actually have to check if the vue branch is already able to build, because it probably doesn't make sense to implement it in the old js)
  • [ ] Add yet another ajax request to resolve user details from author's username (there's probably already an endpoint somewhere...)

te-online avatar Feb 13 '19 19:02 te-online

Any update on this? The issue has been open for more than 3 years, and stale for more than one.

mind-overflow avatar Sep 29 '20 15:09 mind-overflow

Sorry I have taken this on, but haven't finished it. The calendar app was in heavy refactoring at the time and it was pointless to add anything from my perspective, because I couldn't even build the JS. Now that everything is a bit more settled, I will put this on my to do list again and will get back to it asap – unless someone else wants to pick it up, you're very welcome to do so! :-)

te-online avatar Sep 29 '20 19:09 te-online

It's been a long time and I have to admit that I don't really have the time or motivation to do it right now. It's still a nice feature, but I'm going to try and manage expectations here by admitting that I will most likely not pick this up again. Sorry! 😿

te-online avatar Feb 13 '22 15:02 te-online

We'd really like to see the author / editor of an event, too – re-opened the bounty.

webermax avatar Apr 04 '22 09:04 webermax

We don't use bountysource anymore: https://help.nextcloud.com/t/dont-use-bountysource-anymore/84943

tcitworld avatar Apr 04 '22 09:04 tcitworld

We don't use bountysource anymore: https://help.nextcloud.com/t/dont-use-bountysource-anymore/84943

Thanks, couldn't know that – might be a good idea to provide a hint (at least for issues with the bounty label) Furthermore they changed the "timeouts" as far as I could see by now.

(Btw. help.nextcloud.com loads incredibly slow...)

webermax avatar Apr 04 '22 09:04 webermax

(Btw. help.nextcloud.com loads incredibly slow...)

(off-topic) yeah, unfortunately nextcloud's forum have been almost impossible to use from most european countries for a few years now. iirc, their ISP has a routing problem and no one is working on it. if you use a VPN located in the US, you'll get almost instant loading times.

mind-overflow avatar Apr 04 '22 09:04 mind-overflow

This would be great! And to go further, also showing the event creation time/date and the ability to configure a calendar to prefix each event with its creator (e.g. in a shared vacation calendar or something) would be fantastic.

xeruf avatar Jun 04 '22 16:06 xeruf

IMO, I think using the Organizer attribute would be a good option. This way we would be able to see who the owner/organizer is even when using a client that doesn't know about the custom X-NC-CREATOR attribute.

Logically it seems to make sense that whoever created the event would be the organizer of the event even if there are no other 'attendees'.

meichthys avatar Sep 22 '22 15:09 meichthys

IMO, I think using the Organizer attribute would be a good option. This way we would be able to see who the owner/organizer is even when using a client that doesn't know about the custom X-NC-CREATOR attribute.

Logically it seems to make sense that whoever created the event would be the organizer of the event even if there are no other 'attendees'.

Yes, absolutely true - any chance to have this any soon?

In shared calendar scenario this information is essential to be productive even within NC itself.

webermax avatar Jun 26 '23 10:06 webermax

Any news?

olegchensky avatar Jun 02 '24 13:06 olegchensky