Il 28/05/20 19:04, Fabio Valentini ha scritto:
Since bugzilla keeps track of which user set which flag, do you maybe
need to specify which user's needinfo flag you want to clear?
Fabio
I'm already passing all the flag object properties, id included:
>> bug = bz.getbug(1730464)
>> flags = bug.flags
>> flags
[{'status': '?', 'name':
'fedora-review', 'modification_date': <DateTime
'20200528T16:04:43' at 0x7f2af35903a0>, 'creation_date': <DateTime
'20200528T16:04:43' at 0x7f2af3590400>, 'is_active': 1,
'type_id': 65,
'id': 4045137, 'setter': 'mattia.verga(a)protonmail.com'},
{'requestee':
'mattia.verga(a)protonmail.com', 'status': '?', 'name':
'needinfo',
'modification_date': <DateTime '20200528T16:36:27' at
0x7f2af3590490>,
'creation_date': <DateTime '20200528T16:36:27' at 0x7f2af35904c0>,
'is_active': 1, 'type_id': 16, 'id': 4045139, 'setter':
'mattia.verga(a)protonmail.com'}]
>> for idx, flag in enumerate(flags):
... if
'name' in flag and flag['name'] in ['needinfo',
'fedora-review']:
... flags[idx]['status'] = 'X'
...
>> update = bz.build_update(flags=flags)
>> update
{'flags': [{'status': 'X', 'name':
'fedora-review', 'modification_date':
<DateTime '20200528T16:04:43' at 0x7f2af35903a0>, 'creation_date':
<DateTime '20200528T16:04:43' at 0x7f2af3590400>, 'is_active': 1,
'type_id': 65, 'id': 4045137, 'setter':
'mattia.verga(a)protonmail.com'},
{'requestee': 'mattia.verga(a)protonmail.com', 'status':
'X', 'name':
'needinfo', 'modification_date': <DateTime '20200528T16:36:27'
at
0x7f2af3590490>, 'creation_date': <DateTime '20200528T16:36:27' at
0x7f2af35904c0>, 'is_active': 1, 'type_id': 16, 'id': 4045139,
'setter':
'mattia.verga(a)protonmail.com'}]}
I've also tried to change the setter or the requestee, since the error
mentions a 'user account', but I always end with an error.
Mattia