mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 23:27:54 +00:00
Fix #4037. IfcTester reports now also include an element type column.
This commit is contained in:
@@ -382,6 +382,7 @@ class Ods(Json):
|
|||||||
"GlobalId",
|
"GlobalId",
|
||||||
"Tag",
|
"Tag",
|
||||||
"Element",
|
"Element",
|
||||||
|
"ElementType",
|
||||||
]:
|
]:
|
||||||
tc = TableCell(valuetype="string", stylename="h")
|
tc = TableCell(valuetype="string", stylename="h")
|
||||||
tc.addElement(P(text=header))
|
tc.addElement(P(text=header))
|
||||||
@@ -391,6 +392,8 @@ class Ods(Json):
|
|||||||
if requirement["status"]:
|
if requirement["status"]:
|
||||||
continue
|
continue
|
||||||
for failure in requirement["failed_entities"]:
|
for failure in requirement["failed_entities"]:
|
||||||
|
element = failure.get("element", None)
|
||||||
|
element_type = ifcopenshell.util.element.get_type(failure.get("element", None))
|
||||||
row = [
|
row = [
|
||||||
requirement["description"],
|
requirement["description"],
|
||||||
failure.get("reason", "No reason provided"),
|
failure.get("reason", "No reason provided"),
|
||||||
@@ -400,7 +403,8 @@ class Ods(Json):
|
|||||||
failure["description"],
|
failure["description"],
|
||||||
failure["global_id"],
|
failure["global_id"],
|
||||||
failure["tag"],
|
failure["tag"],
|
||||||
str(failure.get("element", "No element found")),
|
str(element) if element else "N/A",
|
||||||
|
str(element_type) if element_type else "N/A",
|
||||||
]
|
]
|
||||||
tr = TableRow()
|
tr = TableRow()
|
||||||
c = 0
|
c = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user