Ich habe den I-Doit Ordner aus dem Archiv von vor einigen Wochen zurückkopiert und es noch einmal versucht. Dabei konnte ich feststellen das vorher das andere SQL Statement (das von -9) verwendet wurde.
Scheinbar scheint sich dort etwas irgendwie geändert zu haben..
Latest posts made by duffkess
-
RE: Keine Referenzierbaren Objekte in der Standort-Liste
-
RE: No Referenceable Objects in Location List of Server/Switch etc.
I recovered the programms folder from a few weeks ago and tried it again. I could see that the i-doit used the correct sql statement (the one from the -9 version) a few weeks ago, but i have no idea how this could be happen..
-
Keine Referenzierbaren Objekte in der Standort-Liste
Hallo Zusammen,
Wir verwenden die I-Doit Version 0.9.9-8 PRO als Produktivsystem und die version 0.9.9-9 PRO als Testumgebung.
Dabei haben wir folgendes Problem:
In der -9 Version kann man ganz normal die Standorte über Server->Editieren->Standort auswählen, in der -8 Version jedoch nicht, das Standort-Popup ist leer und zeige keine Objekte an, obwohl die Objekte in Räume / Gebäude exisitieren.Nachdem ich etwas gedebuggt habe, habe ich herrausgefunden das es einen kleinen unterschied zwischen den SQL Befehlen gibt, die die Standort-Liste liefern sollen.
Der normal funktionierende Befehl auf der Version 9 ist:
SELECT (SELECT COUNT(child.isys_catg_location_list__id) FROM isys_catg_location_list child INNER JOIN isys_obj childObject ON child.isys_catg_location_list__isys_obj__id = childObject.isys_obj__id INNER JOIN isys_obj_type childType ON childObject.isys_obj__isys_obj_type__id = childType.isys_obj_type__id INNER JOIN isys_cmdb_status ON childObject.isys_obj__isys_cmdb_status__id = isys_cmdb_status__id WHERE child.isys_catg_location_list__parentid = parentObject.isys_obj__id AND childType.isys_obj_type__container = 1) AS ChildrenCount, parent.*, parentObject.*, parentType.* FROM isys_catg_location_list parent INNER JOIN isys_obj parentObject ON parent.isys_catg_location_list__isys_obj__id = parentObject.isys_obj__id INNER JOIN isys_obj_type parentType ON parentObject.isys_obj__isys_obj_type__id = parentType.isys_obj_type__id WHERE TRUE AND parent.isys_catg_location_list__parentid = '1' AND parentType.isys_obj_type__container = 1 AND parentObject.isys_obj__status = '2' GROUP BY parent.isys_catg_location_list__id ORDER BY parentObject.isys_obj__title
und der nicht funktionierende Code der Version -8:
SELECT (SELECT COUNT(child.isys_catg_location_list__id) FROM isys_catg_location_list child INNER JOIN isys_obj childObject ON child.isys_catg_location_list__isys_obj__id = childObject.isys_obj__id INNER JOIN isys_obj_type childType ON childObject.isys_obj__isys_obj_type__id = childType.isys_obj_type__id INNER JOIN isys_cmdb_status ON childObject.isys_obj__isys_cmdb_status__id = isys_cmdb_status__id WHERE child.isys_catg_location_list__parentid = parentObject.isys_obj__id AND childType.isys_obj_type__container = 1) AS ChildrenCount, parent.*, parentObject.*, parentType.* FROM isys_catg_location_list parent INNER JOIN isys_obj parentObject ON parent.isys_catg_location_list__isys_obj__id = parentObject.isys_obj__id INNER JOIN isys_obj_type parentType ON parentObject.isys_obj__isys_obj_type__id = parentType.isys_obj_type__id WHERE TRUE AND parent.isys_catg_location_list__isys_obj__id = '1' AND parentType.isys_obj_type__container = 1 AND parentObject.isys_obj__status = '2' GROUP BY parent.isys_catg_location_list__id ORDER BY parentObject.isys_obj__title
( sorry für das posten des gesamten sql statements..)
Der Unterschied der beiden Statements ist beim Attribut:
… WHERE TRUE AND parent.isys_catg_location_list__isys_obj__id = '1' ... -> falsches statement
... WHERE TRUE AND parent.isys_catg_location_list__parentid = '1' ... -> richtiges statementich habe beide Abfragen bei beiden Datenbanken getestet und die falsche Abfrage gab immer nur 1 Ergebnis zurück (Die root-location), die richtige Abfrage gab als Ergebnisse bei beiden Datenbanken die korrekte Liste der Standorte zurück.
Also denke ich, dass bei dem SQL Statement der Fehler auftritt.
Gibt es irgendwelche Möglichkeiten zu ändern wie das SQL Statement aufgebaut wird, um zu sehen ob sich an der I-Doit ausgabe etwas ändert?
Oder gibt es vielleicht noch andere Ideen?vielen Dank schonmal im vorraus
Gruß Duffkess( PS: habe bereits im englischen Teil gepostet und leider erst dannach gesehn, dass es auch einen deutschen Teil gibt..)
-
No Referenceable Objects in Location List of Server/Switch etc.
Hello Everybody,
We are using I-Doit 0.9.9-8 PRO as a productive system and a 0.9.9-9 PRO as testing environment.
The problem is the following:
On the -9 Version i can simply reference location-objects by editing the location property in any switch or server etc, but on the -8 Version, i cant because the location-popup is just blank.( when i click on rooms or buildings, they are all there )
I did a little bit of debugging and figured out that there is a little difference beetween the SQL querys which should get the locations list.
On the normal Working -9 the SQL Statement is:
SELECT (SELECT COUNT(child.isys_catg_location_list__id) FROM isys_catg_location_list child INNER JOIN isys_obj childObject ON child.isys_catg_location_list__isys_obj__id = childObject.isys_obj__id INNER JOIN isys_obj_type childType ON childObject.isys_obj__isys_obj_type__id = childType.isys_obj_type__id INNER JOIN isys_cmdb_status ON childObject.isys_obj__isys_cmdb_status__id = isys_cmdb_status__id WHERE child.isys_catg_location_list__parentid = parentObject.isys_obj__id AND childType.isys_obj_type__container = 1) AS ChildrenCount, parent.*, parentObject.*, parentType.* FROM isys_catg_location_list parent INNER JOIN isys_obj parentObject ON parent.isys_catg_location_list__isys_obj__id = parentObject.isys_obj__id INNER JOIN isys_obj_type parentType ON parentObject.isys_obj__isys_obj_type__id = parentType.isys_obj_type__id WHERE TRUE AND parent.isys_catg_location_list__parentid = '1' AND parentType.isys_obj_type__container = 1 AND parentObject.isys_obj__status = '2' GROUP BY parent.isys_catg_location_list__id ORDER BY parentObject.isys_obj__title
and the not working code of the -8 Version is :
SELECT (SELECT COUNT(child.isys_catg_location_list__id) FROM isys_catg_location_list child INNER JOIN isys_obj childObject ON child.isys_catg_location_list__isys_obj__id = childObject.isys_obj__id INNER JOIN isys_obj_type childType ON childObject.isys_obj__isys_obj_type__id = childType.isys_obj_type__id INNER JOIN isys_cmdb_status ON childObject.isys_obj__isys_cmdb_status__id = isys_cmdb_status__id WHERE child.isys_catg_location_list__parentid = parentObject.isys_obj__id AND childType.isys_obj_type__container = 1) AS ChildrenCount, parent.*, parentObject.*, parentType.* FROM isys_catg_location_list parent INNER JOIN isys_obj parentObject ON parent.isys_catg_location_list__isys_obj__id = parentObject.isys_obj__id INNER JOIN isys_obj_type parentType ON parentObject.isys_obj__isys_obj_type__id = parentType.isys_obj_type__id WHERE TRUE AND parent.isys_catg_location_list__isys_obj__id = '1' AND parentType.isys_obj_type__container = 1 AND parentObject.isys_obj__status = '2' GROUP BY parent.isys_catg_location_list__id ORDER BY parentObject.isys_obj__title
( sorry for posting the whole sql statement..)
the difference beetween these two statements is at:
… WHERE TRUE AND parent.isys_catg_location_list__isys_obj__id = '1' ... -> wrong statement
... WHERE TRUE AND parent.isys_catg_location_list__parentid = '1' ... -> correct statementi have testet both statements on both databases directy in sql and the wrong statement always returns 1 result ( the root location ) and the korrekt statement returns the correct list of locations in both versions.
So i guess there went something wrong with the SQL statement.
is there any possibility to change how the SQL statement is builded, just to see if something changes?
Or do you have any other ideas?I will be grateful for any help you can provide.
Duffkess