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

cannot create tickets #1618

Closed
cwerner1 opened this issue Nov 5, 2023 · 1 comment
Closed

cannot create tickets #1618

cwerner1 opened this issue Nov 5, 2023 · 1 comment

Comments

@cwerner1
Copy link

cwerner1 commented Nov 5, 2023

Setup: ERPNEXT with Helpdesk

I've an Erpnext instance with multiple Customers and Contacts Mails. (Doctype: Customer)
In Helpdesk I didn't create my Customers (Doctype HD Customer)

When I want to create Ticketin the CustomerPortal or email: Helpdesk finds my Contact Email in the Doctype Customer (CUST-100xx) and wants to link the HD Ticket with the Document Customer:CUST-100xx. - which is not valid.

`Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 110, in application
response = frappe.api.handle(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/api/init.py", line 49, in handle
data = endpoint(**arguments)
^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call
return frappe.handler.handle()
^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/handler.py", line 49, in handle
data = execute_cmd(cmd)
^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/handler.py", line 85, in execute_cmd
return frappe.call(method, **frappe.form_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/init.py", line 1682, in call
return fn(*args, **newargs)
^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "apps/helpdesk/helpdesk/helpdesk/doctype/hd_ticket/api.py", line 17, in new
d.create_communication_via_contact(d.description, attachments)
File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "apps/helpdesk/helpdesk/helpdesk/doctype/hd_ticket/hd_ticket.py", line 554, in create_communication_via_contact
c.save(ignore_permissions=True)
File "apps/frappe/frappe/model/document.py", line 334, in save
return self._save(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/model/document.py", line 356, in _save
return self.insert()
^^^^^^^^^^^^^
File "apps/frappe/frappe/model/document.py", line 310, in insert
self.run_post_save_methods()
File "apps/frappe/frappe/model/document.py", line 1118, in run_post_save_methods
self.run_method("on_update")
File "apps/frappe/frappe/model/document.py", line 950, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/model/document.py", line 1316, in composer
return composed(self, method, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/model/document.py", line 1298, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/model/document.py", line 947, in fn
return method_object(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/core/doctype/communication/communication.py", line 278, in on_update
parent.on_communication_update(self)
File "apps/helpdesk/helpdesk/helpdesk/doctype/hd_ticket/hd_ticket.py", line 682, in on_communication_update
self.save()
File "apps/frappe/frappe/model/document.py", line 334, in save
return self._save(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/model/document.py", line 368, in _save
self._validate_links()
File "apps/frappe/frappe/model/document.py", line 918, in validate_links
frappe.throw(
("Could not find {0}").format(msg), frappe.LinkValidationError)
File "apps/frappe/frappe/init.py", line 570, in throw
msgprint(
File "apps/frappe/frappe/init.py", line 542, in msgprint
_raise_exception()
File "apps/frappe/frappe/init.py", line 496, in _raise_exception
raise exc
frappe.exceptions.LinkValidationError: Kunde: CUST-100xx konnte nicht gefunden werden

`

@cwerner1
Copy link
Author

#1624 fixes this Problem

@ssiyad ssiyad closed this as completed Nov 27, 2023
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

2 participants