nextcloud / calendar_resource_management

Resources back-end for the Nextcloud CalDAV server
https://apps.nextcloud.com/apps/calendar_resource_management
GNU Affero General Public License v3.0
65 stars 14 forks source link

Duplicate entry 'email' for key 'calresources_resources_eml' #22

Open manu-p opened 3 years ago

manu-p commented 3 years ago

Hi,

It looks like it is not allowed to assign the same email address to more than one resource.

Let's say I want to set up "hotspots" resources, we get more than one and they're all under the responsibility of the same guy.

So here's what I enter:

sudo -u www-data php /var/www/nextcloud/occ calendar-resource:resource:create "HS1" 3 "Hotspot 1" "tech@domain" "Internet Access Point" "Name"

Right, here's for the 1st one.

Then:

sudo -u www-data php /var/www/nextcloud/occ calendar-resource:resource:create "HS2" 3 "Hotspot 2" "tech@domain" "Internet Access Point" "Name"

And here's what I get:

In ExceptionConverter.php line 60:

  An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'tech@domain' for key 'calresources_resources_eml'  

In Exception.php line 26:

  SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'tech@domain' for key 'calresources_resources_eml'  

In Statement.php line 92:

  SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'tech@domain' for key 'calresources_resources_eml'  

calendar-resource:resource:create <uid> <building_id> <display_name> <email> <resource_type> [<contact_person_user_id>]
ChristophWurst commented 3 years ago

It looks like it is not allowed to assign the same email address to more than one resource.

The email is not a real email. It identifies the resource. Hence it has to be unique.

manu-p commented 3 years ago

It's also the email address that receives the invitation when the resource is being booked, and from which the booking is accepted or not. Isn't it?

ChristophWurst commented 3 years ago

It's not. Nextcloud will schedule them automatically.

Ref https://docs.nextcloud.com/server/latest/admin_manual/groupware/calendar.html#resources-and-rooms Ref https://github.com/nextcloud/server/pull/16615

manu-p commented 3 years ago

OK.

How can an email not be a 'real email'?

When I book a resource, I can see an email is sent to the email address (or alias) that's been associated to the resource.

Is there not a relation between 'contact_person_user_id' and 'email'?

I think I'll wait for a documentation before continuing the tests.

HaiQ31 commented 1 year ago

When I book a resource, I can see an email is sent to the email address (or alias) that's been associated to the resource.

This is still the behaviour I observe in 0.5.0 with NC27. It floods the mailaddress specified in the NC settings with "can not deliver" responses, when the email address for the ressource not exists.