[WEB-5835] fix: Issue when creating work items from a project template with dropdown properties #5297

This commit is contained in:
Dheeraj Kumar Ketireddy
2026-01-02 17:30:14 +05:30
committed by GitHub
parent 1fe9fce072
commit 1e3df7a73f
+10 -1
View File
@@ -445,7 +445,16 @@ def create_issue_property_values(
template_property_id = str(property.get("id"))
actual_property_id = workitem_property_map.get(template_property_id)
if actual_property_id:
converted_properties[actual_property_id] = property.get("values", [])
if property.get("property_type") == PropertyTypeEnum.OPTION:
values = property.get("values", [])
converted_values = []
for value in values:
new_option_id = workitem_property_option_map.get(str(value))
if new_option_id:
converted_values.append(new_option_id)
converted_properties[actual_property_id] = converted_values
else:
converted_properties[actual_property_id] = property.get("values", [])
# Validate the data
property_validators(