Revert "Filling in menu lists on the bug report form no longer depends on the exact item format used by Gitea."

This reverts commit bf7389466a66d3a8cc16daaa53386b67eefd8cad.
This commit is contained in:
Jamie Greunbaum 2024-05-31 19:57:52 -04:00
parent 512658b0e5
commit d4d59c957c
2 changed files with 7 additions and 7 deletions

View File

@ -98,19 +98,19 @@ func __prepare_form_thread(callback:Callable) -> void:
for label_in:Dictionary in response_data:
if version_prefix and label_in["name"].begins_with(version_prefix):
label_in["name"] = (label_in["name"] as String).replace(version_prefix, "")
tag_lists[BugbotTagArray.VERSION].append(label_in["name"])
tag_lists[BugbotTagArray.VERSION].append(label_in)
if hardware_prefix and label_in["name"].begins_with(hardware_prefix):
label_in["name"] = (label_in["name"] as String).replace(hardware_prefix, "")
tag_lists[BugbotTagArray.HARDWARE].append(label_in["name"])
tag_lists[BugbotTagArray.HARDWARE].append(label_in)
if os_prefix and label_in["name"].begins_with(os_prefix):
label_in["name"] = (label_in["name"] as String).replace(os_prefix, "")
tag_lists[BugbotTagArray.OS].append(label_in["name"])
tag_lists[BugbotTagArray.OS].append(label_in)
if component_prefix and label_in["name"].begins_with(component_prefix):
label_in["name"] = (label_in["name"] as String).replace(component_prefix, "")
tag_lists[BugbotTagArray.COMPONENT].append(label_in["name"])
tag_lists[BugbotTagArray.COMPONENT].append(label_in)
if priority_prefix and label_in["name"].begins_with(priority_prefix):
label_in["name"] = (label_in["name"] as String).replace(priority_prefix, "")
tag_lists[BugbotTagArray.SEVERITY].append(label_in["name"])
tag_lists[BugbotTagArray.SEVERITY].append(label_in)
callback.call_deferred(tag_lists)
__bugbot_server_thread.call_deferred("wait_to_finish")

View File

@ -65,8 +65,8 @@ func __fill_item_list(menu_button:MenuButton, label_group:int):
else:
var menu : PopupMenu = menu_button.get_popup()
for i in menu_options.size():
menu.add_item(menu_options[i], i)
menu.id_pressed.connect(func(id:int): menu_button.text = menu_options[id])
menu.add_item(menu_options[i]["name"], i)
menu.id_pressed.connect(func(id:int): menu_button.text = menu_options[id]["name"])
func _on_submit_button_pressed() -> void: