Comments (3)
To reproduce from tests suite:
diff --git a/tests/functional/Glpi/Inventory/Inventory.php b/tests/functional/Glpi/Inventory/Inventory.php
index 95c576353f..5ed5d1f78a 100644
--- a/tests/functional/Glpi/Inventory/Inventory.php
+++ b/tests/functional/Glpi/Inventory/Inventory.php
@@ -4931,7 +4931,7 @@ Compiled Tue 28-Sep-10 13:44 by prod_rel_team",
$services = [$mysql];
$json->content->databases_services = $services;
- $this->doInventory($json);
+ $inventory = $this->doInventory($json);
//check created databases & instances
$this->integer(countElementsInTable(\DatabaseInstance::getTable(), ['is_deleted' => 0]))->isIdenticalTo(1);
@@ -4951,6 +4951,17 @@ Compiled Tue 28-Sep-10 13:44 by prod_rel_team",
$this->array(array_pop($databases))
->string['name']->isIdenticalTo('glpi')
->integer['size']->isIdenticalTo(55000);
+
+ $computer = new \Computer();
+ global $DB;
+ $agents = $DB->request(['FROM' => \Agent::getTable()]);
+ $this->integer(count($agents))->isIdenticalTo(1);
+ $agent = $agents->current();
+ $computers_id = $agent['items_id'];
+ $this->boolean($computer->getFromDB($computers_id))->isTrue();
+ $this->boolean($computer->delete(['id' => $computers_id], true))->isTrue();
}
I've not been able to find how to fix. To me, removing data in Computer::pre_deleteItem()
should have done the trick, but it did not.
from glpi.
When creating a databse instance from the UI, without selecting any Item type
/Item
, the itemtype
value stored in DB is 0
. It whould probably be null in this case. Anyway, the problem is that this field is not nullable, but it should probably be nullable, as the value is not mandatory.
from glpi.
Not sure null is a correct solution. Having database instance back from inventory would probably create a new record; in that case, it may be better to remove instance when attached computer is purged.
That kind of case must probably be added in tests so we know hos it works.
from glpi.
Related Issues (20)
- GLPI server time zone shows in Setup > Authentication instead of Setup > General HOT 4
- Planning export CalDav issue: external only events are shown
- Planning export CalDav issues: events tagged in UTC
- Error when opening tickets with cloned entities HOT 3
- Planning export CalDav issue: all day becomes from to
- DataType incorrect table glpi_items_disks update 10.0.14 to 10.0.15 HOT 1
- GLPI Notification problem
- Database integrity HOT 2
- Error during installation version 10.0.15 HOT 1
- Forum registration seems broken
- New Ticket creation Simplified Interface does not show all options as in the template view for New Ticket
- Impossible to use `@` in password HOT 4
- Apache MPM Event compatibility HOT 1
- About the server URL to use as server parameter, it will depends on you server and plugins installation HOT 1
- Discrepancies in the financial and administrative information HOT 4
- cant login after upgrade 10.0.8 and newer disable zend_extension=opcache its not solution HOT 4
- Can not set manager field on ldap auth settings: Undefined array key "responsible_field" HOT 2
- Has anyone else encountered this error when trying to search in Consumables? HOT 2
- php compatible HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glpi.