Project

General

Profile

Actions

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.

Status:
Resolved
Priority:
Normal
Assignee:
Start date:
2022-08-08
Due date:
2022-08-27
% Done:

0%

Estimated time:

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
Actions #1

Updated by osukup over 2 years ago

  • Description updated (diff)
Actions #2

Updated by osukup over 2 years ago

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"]
Actions #3

Updated by okurz over 2 years ago

  • Target version set to Ready
Actions #4

Updated by mkittler over 2 years ago

  • 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
Actions #5

Updated by osukup over 2 years ago

  • Assignee set to osukup
Actions #6

Updated by osukup over 2 years ago

  • Status changed from Workable to In Progress
Actions #7

Updated by openqa_review over 2 years ago

  • Due date set to 2022-08-27

Setting due date based on mean cycle time of SUSE QE Tools

Actions #8

Updated by livdywan over 2 years ago

  • Description updated (diff)
Actions #10

Updated by osukup over 2 years ago

  • Status changed from In Progress to Feedback

released as 0.51.0, together with fix for metadata.json parsing

Actions #11

Updated by osukup over 2 years ago

  • Status changed from Feedback to Resolved

fixed problem in packaging ( typo in new Requires) .. rest looks ok, no complaints from users

Actions

Also available in: Atom PDF