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

API Errors #60

Open
Lukas871 opened this issue Jul 11, 2017 · 3 comments
Open

API Errors #60

Lukas871 opened this issue Jul 11, 2017 · 3 comments

Comments

@Lukas871
Copy link

Hi, I have a few problems with helpdesk API.

  • GET /api/rest/latest/desk/tickets - raise fatal error (Fatal error: Call to undefined method Oro\Bundle\UserBundle\Entity\User::getDiamanteUser() in /srv/application/diamantedesk-application/src/Diamante/DeskBundle/Api/Internal/TicketApiServiceImpl.php on line 458)

  • PUT /api/rest/latest/desk/tickets with the json data from documentation does not create tags. No matter if tag was created before from frontend or not. New ticket is created without tags.

  • PATCH /api/rest/latest/desk/tickets - when I use the json data from documentation it cause error {"error":"Expected object but got array. Do you have the wrong @Type mapping or could this be a Doctrine many-to-many relation?"}. When tag is added from frontend then calling this api it raise fatal error exception.

  • GET /api/rest/latest/desk/tickets/2/assignee - returns html H2 containging Loading... Insted of json data.

I tried this on two diferent instalations on two deiferent servers, but still with the same result.
Do you have any ideas what can be wrong?
Thank you, Lukas

@northdakota
Copy link
Contributor

Hi Lukas871,
Could you please to specify what version of diamantedesk you use?

@Lukas871
Copy link
Author

It is version 2.0.3.

@Lukas871
Copy link
Author

In profiler (during update ticket PATCH /api/rest/latest/desk/tickets) there are 3 mapping errors:

The association Diamante\UserBundle\Entity\DiamanteUser#apiUser refers to the owning side field Diamante\UserBundle\Entity\ApiUser#id which is not defined as association, but as field.
The association Diamante\UserBundle\Entity\DiamanteUser#apiUser refers to the owning side field Diamante\UserBundle\Entity\ApiUser#id which does not exist.

The mappings Diamante\UserBundle\Entity\ApiUser#diamanteUser and Diamante\UserBundle\Entity\DiamanteUser#apiUser are inconsistent with each other.

In my last point from the first comment I used wrong path (GET /api/rest/latest/desk/tickets/2/assignee -> GET /api/rest/latest/desk/ticket/2/assignee) so the hedline with loading is returned when the path is not found.

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