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

Impossible to create Job in a task when default entity is Full structure for (super) user account. #592

Open
2 tasks done
felag opened this issue Jan 15, 2025 · 1 comment

Comments

@felag
Copy link

felag commented Jan 15, 2025

Code of Conduct

  • I agree to follow this project's Code of Conduct

Is there an existing issue for this?

  • I have searched the existing issues

GLPI Version

10.0.17

Plugin version

1.4.0

Bug description

Hello,

When trying to create a new job into a task, with an account with default entity set to Full structure (see this MR), job is not created (and an SQL error appears, see Relevant log output hereafter).

Pages loads and then same empty form appears.

If default entity is changed in user's account (to Root entity), then job is created without problem.

Relevant log output

[2025-01-15 15:58:43] glpisqllog.ERROR: DBmysql::doQuery() in /var/www/ZZZZZZ/src/DBmysql.php line 395
  *** MySQL query error:
  SQL: INSERT INTO `glpi_plugin_glpiinventory_taskjobs` (`plugin_glpiinventory_tasks_id`, `name`, `comment`, `method`, `restrict_to_task_entity`, `entities_id`, `date_creation`) VALUES ('68', 'Test4', '', '', '0', NULL, '2025-01-15 16:58:43')
  Error: Column 'entities_id' cannot be null
  Backtrace :
  src/DBmysql.php:1376                               DBmysql->doQuery()
  src/CommonDBTM.php:730                             DBmysql->insert()
  src/CommonDBTM.php:1349                            CommonDBTM->addToDB()
  ...ins/glpiinventory/inc/taskjobview.class.php:940 CommonDBTM->add()
  plugins/glpiinventory/front/taskjob.form.php:48    PluginGlpiinventoryTaskjobView->submitForm()
  public/index.php:82                                require()
  {"user":"XXX@YYYYYY"}

Page URL

No response

Steps To reproduce

  1. Go to AdministrationGLPI Inventory
  2. Go to TasksTasks management
  3. Select a task
  4. Go to tab Job configuration
  5. Fill Name field (with Test4, for example)
  6. Select Package deploy as Module Method
  7. clic Add button

Your GLPI setup information

No response

Anything else?

No response

@trasher
Copy link
Collaborator

trasher commented Jan 16, 2025

Please try with latest GLPI 10.0/bugfixes nightly build, problem may have been solved.

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

No branches or pull requests

2 participants