| 178 | |
| 179 | |
| 180 | def set_status_triage( |
| 181 | project_id: str, item_id: str, field_id: str, option_id: str |
| 182 | ) -> bool: |
| 183 | mutation = ( |
| 184 | "mutation($p: ID!, $i: ID!, $f: ID!, $o: String!) { " |
| 185 | "updateProjectV2ItemFieldValue(input: " |
| 186 | "{projectId: $p, itemId: $i, fieldId: $f, " |
| 187 | "value: {singleSelectOptionId: $o}}) { projectV2Item { id } } }" |
| 188 | ) |
| 189 | try: |
| 190 | d = graphql(mutation, p=project_id, i=item_id, f=field_id, o=option_id) |
| 191 | except SystemExit: |
| 192 | return False |
| 193 | return bool( |
| 194 | (d.get("data") or {}) |
| 195 | .get("updateProjectV2ItemFieldValue", {}) |
| 196 | .get("projectV2Item") |
| 197 | ) |
| 198 | |
| 199 | |
| 200 | def fetch_date_field(owner: str, number: int, date_field_name: str) -> str: |