Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
manu-p opened this issue Nov 23, 2021 · 5 comments
Open

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

manu-p opened this issue Nov 23, 2021 · 5 comments

Comments

@manu-p
Copy link

manu-p commented Nov 23, 2021

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
Copy link
Member

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
Copy link
Author

manu-p commented Nov 24, 2021

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
Copy link
Member

@manu-p
Copy link
Author

manu-p commented Nov 25, 2021

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
Copy link

HaiQ31 commented Oct 9, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants