Flow_01ffhv6
Flow_110nxt9
{
"bamboo_list_metadata": [
{
"fieldId": 4,
"manageable": "yes",
"multiple": "no",
"name": "Department",
"options": [
{
"id": 18568,
"archived": "no",
"createdDate": "2022-12-21T18:21:08+00:00",
"archivedDate": null,
"name": "Accounts Payable"
},
{
"id": 18564,
"archived": "no",
"createdDate": "2022-12-21T18:14:59+00:00",
"archivedDate": null,
"name": "Infrastructure Management"
},
{
"id": 18562,
"archived": "no",
"createdDate": "2022-12-21T18:08:59+00:00",
"archivedDate": null,
"name": "IT"
}
]
},
{
"fieldId": 1355,
"manageable": "yes",
"multiple": "no",
"name": "Division",
"options": [
{
"id": 18566,
"archived": "no",
"createdDate": "2022-12-21T18:19:08+00:00",
"archivedDate": null,
"name": "Europe"
},
{
"id": 18563,
"archived": "no",
"createdDate": "2022-12-21T18:12:57+00:00",
"archivedDate": null,
"name": "Infrastructure"
},
{
"id": 18570,
"archived": "no",
"createdDate": "2022-12-28T23:15:46+00:00",
"archivedDate": null,
"name": "Legal"
}
]
}
]
}
{
"departments": [
{
"id": 18568,
"archived": "no",
"createdDate": "2022-12-21T18:21:08+00:00",
"archivedDate": null,
"name": "Accounts Payable"
},
{
"id": 18564,
"archived": "no",
"createdDate": "2022-12-21T18:14:59+00:00",
"archivedDate": null,
"name": "Infrastructure Management"
},
{
"id": 18562,
"archived": "no",
"createdDate": "2022-12-21T18:08:59+00:00",
"archivedDate": null,
"name": "IT"
}
],
"divisions": [
{
"id": 18566,
"archived": "no",
"createdDate": "2022-12-21T18:19:08+00:00",
"archivedDate": null,
"name": "Europe"
},
{
"id": 18563,
"archived": "no",
"createdDate": "2022-12-21T18:12:57+00:00",
"archivedDate": null,
"name": "Infrastructure"
},
{
"id": 18570,
"archived": "no",
"createdDate": "2022-12-28T23:15:46+00:00",
"archivedDate": null,
"name": "Legal"
}
]
}
{
"bamboo_list_metadata": [
{
"fieldId": 1355,
"manageable": "yes",
"multiple": "no",
"name": "Division",
"options": [
{
"id": 18566,
"archived": "no",
"createdDate": "2022-12-21T18:19:08+00:00",
"archivedDate": null,
"name": "Europe"
},
{
"id": 18563,
"archived": "no",
"createdDate": "2022-12-21T18:12:57+00:00",
"archivedDate": null,
"name": "Infrastructure"
},
{
"id": 18570,
"archived": "no",
"createdDate": "2022-12-28T23:15:46+00:00",
"archivedDate": null,
"name": "Legal"
}
]
}
]
}
{
"departments": [
],
"divisions": [
{
"archived": "no",
"archivedDate": null,
"createdDate": "2022-12-21T18:19:08+00:00",
"id": 18566,
"name": "Europe"
},
{
"archived": "no",
"archivedDate": null,
"createdDate": "2022-12-21T18:12:57+00:00",
"id": 18563,
"name": "Infrastructure"
},
{
"archived": "no",
"archivedDate": null,
"createdDate": "2022-12-28T23:15:46+00:00",
"id": 18570,
"name": "Legal"
}
]
}
{
"bamboo_list_metadata": [
{
"fieldId": 4,
"manageable": "yes",
"multiple": "no",
"name": "Department",
"options": [
{
"id": 18568,
"archived": "no",
"createdDate": "2022-12-21T18:21:08+00:00",
"archivedDate": null,
"name": "Accounts Payable"
},
{
"id": 18564,
"archived": "no",
"createdDate": "2022-12-21T18:14:59+00:00",
"archivedDate": null,
"name": "Infrastructure Management"
},
{
"id": 18562,
"archived": "no",
"createdDate": "2022-12-21T18:08:59+00:00",
"archivedDate": null,
"name": "IT"
}
]
}
]
}
{
"departments": [
{
"archived": "no",
"archivedDate": null,
"createdDate": "2022-12-21T18:21:08+00:00",
"id": 18568,
"name": "Accounts Payable"
},
{
"archived": "no",
"archivedDate": null,
"createdDate": "2022-12-21T18:14:59+00:00",
"id": 18564,
"name": "Infrastructure Management"
},
{
"archived": "no",
"archivedDate": null,
"createdDate": "2022-12-21T18:08:59+00:00",
"id": 18562,
"name": "IT"
}
],
"divisions": []
}
{
"bamboo_list_metadata": [
{
"fieldId": 4,
"manageable": "yes",
"multiple": "no",
"name": "OTHER FIELD",
"options": []
},
{
"fieldId": 4,
"manageable": "yes",
"multiple": "no",
"name": "Department",
"options": [
{
"id": 18568,
"archived": "no",
"createdDate": "2022-12-21T18:21:08+00:00",
"archivedDate": null,
"name": "Accounts Payable"
},
{
"id": 18564,
"archived": "no",
"createdDate": "2022-12-21T18:14:59+00:00",
"archivedDate": null,
"name": "Infrastructure Management"
},
{
"id": 18562,
"archived": "no",
"createdDate": "2022-12-21T18:08:59+00:00",
"archivedDate": null,
"name": "IT"
}
]
},
{
"fieldId": 1355,
"manageable": "yes",
"multiple": "no",
"name": "Division",
"options": [
{
"id": 18566,
"archived": "no",
"createdDate": "2022-12-21T18:19:08+00:00",
"archivedDate": null,
"name": "Europe"
},
{
"id": 18563,
"archived": "no",
"createdDate": "2022-12-21T18:12:57+00:00",
"archivedDate": null,
"name": "Infrastructure"
},
{
"id": 18570,
"archived": "no",
"createdDate": "2022-12-28T23:15:46+00:00",
"archivedDate": null,
"name": "Legal"
}
]
}
]
}
{
"departments": [
{
"archived": "no",
"archivedDate": null,
"createdDate": "2022-12-21T18:21:08+00:00",
"id": 18568,
"name": "Accounts Payable"
},
{
"archived": "no",
"archivedDate": null,
"createdDate": "2022-12-21T18:14:59+00:00",
"id": 18564,
"name": "Infrastructure Management"
},
{
"archived": "no",
"archivedDate": null,
"createdDate": "2022-12-21T18:08:59+00:00",
"id": 18562,
"name": "IT"
}
],
"divisions": [
{
"archived": "no",
"archivedDate": null,
"createdDate": "2022-12-21T18:19:08+00:00",
"id": 18566,
"name": "Europe"
},
{
"archived": "no",
"archivedDate": null,
"createdDate": "2022-12-21T18:12:57+00:00",
"id": 18563,
"name": "Infrastructure"
},
{
"archived": "no",
"archivedDate": null,
"createdDate": "2022-12-28T23:15:46+00:00",
"id": 18570,
"name": "Legal"
}
]
}
Flow_1960par
Flow_110nxt9
departments_and_divisions = {
field["name"]: field["options"]
for field in bamboo_list_metadata
if field["name"] in ["Department", "Division"]
}
departments = departments_and_divisions.get("Department", [])
divisions = departments_and_divisions.get("Division", [])
dept_list = [{"id": x["id"], "name": x["name"]} for x in departments]
dept_enum_list = [{"label": y["name"], "value": str(y["id"])} for y in dept_list]
del(departments_and_divisions)
del(bamboo_list_metadata)
Flow_01ffhv6
Flow_1960par