Open sleviim opened 1 year ago
I applied the fix from patch https://github.com/RedHatQE/pylero/pull/151
- didn't get this, does this patch has to do anything with the current issue? I just merged that patch.
Notes for me: Somehow the custom fields aren't getting populated correctly when they were being set in base polarion from CustomFieldType
or EnumCustomFieldType
.
I did spend some good amount of time, didn't come to any conclusion, will recheck.
Hi, I tried to do some testing and those are the results I ran into so far:
tr = TestRun(tr.test_run_id, project_id="XX") [print(f.__dict__) for f in tr._custom_fields]
Here's a snippet of the output (instead of an empty list:
{'_cls_suds_map': {'key': 'key', 'value': {'field_name': 'value', 'cls': <class 'pylero.enum_option_id.EnumOptionId'>}}, '_suds_object': (Custom){ key = "build" value = "glibc-XXX-aarch64" }}
It seems that reaching the 'build' info isn't just using key & value, but is more complex.
When trying to use the get_custom_field() function for getting a custom field value of a test run, the returned item is None. In test_run.py#get_custom_field there's the following assignment:
cf = self._custom_fields
Using print(cf) returns an empty list and it seems it wasn't initialized correctly.Some observations:
[print(f.__dict__) for f in tr.get_defined_custom_field_types(project_id="PROJ")]
for listing all custom values and used one of them)