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 group assignation to a ticket #1089

Closed
btry opened this issue Aug 30, 2018 · 0 comments · Fixed by #1103
Closed

Duplicate group assignation to a ticket #1089

btry opened this issue Aug 30, 2018 · 0 comments · Fixed by #1103
Assignees
Labels
Milestone

Comments

@btry
Copy link
Collaborator

btry commented Aug 30, 2018

Describe the bug
see last posts from #1042

See the errors bellow.

*** MySQL query error:
SQL: INSERT INTO glpi_groups_tickets (tickets_id, groups_id, type) VALUES ('15724', '9', '2')
Error: Duplicate entry '15724-2-9' for key 'unicity'
Backtrace :
inc/dbmysql.class.php:917
inc/commondbtm.class.php:537 DBmysql->insert()
inc/commondbtm.class.php:974 CommonDBTM->addToDB()
inc/commonitilobject.class.php:1558 CommonDBTM->add()
inc/ticket.class.php:2160 CommonITILObject->post_addItem()
inc/commondbtm.class.php:975 Ticket->post_addItem()
...ins/formcreator/inc/targetticket.class.php:1261 CommonDBTM->add()
plugins/formcreator/inc/form_answer.class.php:1030 PluginFormcreatorTargetTicket->save()
plugins/formcreator/inc/form_answer.class.php:748 PluginFormcreatorForm_Answer->generateTarget()
plugins/formcreator/inc/form.class.php:1220 PluginFormcreatorForm_Answer->saveAnswers()
plugins/formcreator/front/form.form.php:123 PluginFormcreatorForm->saveForm()

To Reproduce
Steps to reproduce the behavior:

  1. create a form with a target ticket
  2. add a group to actors of type "assigned"
  3. Create a ticket template and set the same group to actors of type assigned
  4. add the ticket template to the target ticket
  5. Fill the form, an SQL error will occur

Expected behavior
No double group assignation to the ticket.

Either the double assignation must be detected, either the ticket template support should be removed. The second option is probably better, but requires the type of ticket (incident or request) be implemented in the plugin.

@btry btry added the bug label Aug 30, 2018
@btry btry added this to the 2.7.0 milestone Aug 30, 2018
@btry btry self-assigned this Aug 30, 2018
btry added a commit to btry/formcreator that referenced this issue Sep 9, 2018
if an actor is added several times (from ticket template and form settings) then unicity in SQL fails and breaks target creation

@see pluginsGLPI#1089

Signed-off-by: Thierry Bugier <tbugier@teclib.com>
@btry btry mentioned this issue Sep 9, 2018
2 tasks
btry added a commit to btry/formcreator that referenced this issue Sep 10, 2018
if an actor is added several times (from ticket template and form settings) then unicity in SQL fails and breaks target creation

@see pluginsGLPI#1089

Signed-off-by: Thierry Bugier <tbugier@teclib.com>
Signed-off-by: btry <tbugier@teclib.com>
btry added a commit to btry/formcreator that referenced this issue Sep 10, 2018
if an actor is added several times (from ticket template and form settings) then unicity in SQL fails and breaks target creation

@see pluginsGLPI#1089

Signed-off-by: Thierry Bugier <tbugier@teclib.com>
btry added a commit that referenced this issue Sep 10, 2018
if an actor is added several times (from ticket template and form settings) then unicity in SQL fails and breaks target creation

@see #1089

Signed-off-by: Thierry Bugier <tbugier@teclib.com>
mohierf pushed a commit to mohierf/formcreator that referenced this issue Dec 4, 2018
if an actor is added several times (from ticket template and form settings) then unicity in SQL fails and breaks target creation

@see pluginsGLPI#1089

Signed-off-by: Thierry Bugier <tbugier@teclib.com>
mohierf pushed a commit to mohierf/formcreator that referenced this issue Dec 4, 2018
if an actor is added several times (from ticket template and form settings) then unicity in SQL fails and breaks target creation

@see pluginsGLPI#1089

Signed-off-by: Thierry Bugier <tbugier@teclib.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant