action #115103
closed
[tools] osc-plugin-qam reads Incident Priority from IBS but that was replaced by SMELT size:M
Added by osukup over 2 years ago.
Updated over 2 years ago.
Description
In past Incident priority was stored as Incident attribute in IBS.
In recent time maintenance stopped using this and Priority is held by SMELT, and attribute is used only for over-ride.
So osc-plugin-qam needs to read priority from IBS and if its empty read correct value from SMELT
Acceptance criteria¶
- AC1: correct value of priority is shown
- Description updated (diff)
needs change this:
https://github.com/openSUSE/osc-plugin-qam/blob/master/oscqam/remotes/priorityremote.py
Related code in MTK to inspire:
@property
@cached_method
def priority(self):
"""
The incident's priority. This comes from SMELT's auto-calculation or from the attribute
OBS:IncidentPriority if the value was overwritten by the user.
Setting this property to None resets the overwritten priority and go back to use the
auto-caculated one.
.. versionadded:: {{0.9.4}}
"""
prio = self.attributes.get("OBS:IncidentPriority")
if not prio:
return self.smeltcli.get_incident_priority(self.id)["priority"]
return int(prio.values[0]) if prio else None
def get_incident_priority(self, incident_id):
"""
Returns the priority and an override indicator of the given incident.
:param int incident_id: Incident ID
:return: Incident priority (`priority`) and override indication (`priorityOverride`)
:rtype: dict
"""
response = self.graphql("""
{
incidents(incidentId: %s) {
edges {
node {
priority
priorityOverride
}
}
}
}""" % incident_id)
edges = response.get("incidents", {}).get("edges", [])
if not edges:
return None
return edges[0]["node"]
- Target version set to Ready
- Subject changed from [tools] osc-plugin-qam reads Incident Priority from IBS but that was replaced by SMELT to [tools] osc-plugin-qam reads Incident Priority from IBS but that was replaced by SMELT size:M
- Description updated (diff)
- Status changed from New to Workable
- Status changed from Workable to In Progress
- Due date set to 2022-08-27
Setting due date based on mean cycle time of SUSE QE Tools
- Description updated (diff)
- Status changed from In Progress to Feedback
released as 0.51.0, together with fix for metadata.json parsing
- Status changed from Feedback to Resolved
fixed problem in packaging ( typo in new Requires) .. rest looks ok, no complaints from users
Also available in: Atom
PDF