Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Jira Tickets view #271

Closed
aminomancer opened this issue Aug 3, 2023 · 0 comments
Closed

Add a Jira Tickets view #271

aminomancer opened this issue Aug 3, 2023 · 0 comments

Comments

@aminomancer
Copy link
Member

aminomancer commented Aug 3, 2023

Related to #270. This view should basically start by querying all the unresolved bugs in our components that have a "See Also" field whose value contains the substring mozilla-hub.atlassian.net/browse/OMC, and have an iteration whose first part (e.g. the 117 in 117.1) matches the current iteration. Then it should loop over each of the returned bugs to organize them by ticket, then make a BugList for each ticket.

let tickets = {};
for (let bug of bugs) {
  let ticket = bug.seeAlso.value.match(
    /mozilla-hub.atlassian.net\/browse\/(OMC-\d+)/
  );
  if (ticket) {
    tickets[ticket[1]] = tickets[ticket[1]] || [];
    tickets[ticket[1]].push(bug);
  }
}

let lists = [];
for (let ticket in tickets) {
  lists.push(
    <BugList
      bugs={tickets[ticket]}
      title={
        <a href={`https://mozilla-hub.atlassian.net/browse/${ticket}`}>
          {ticket}
        </a>
      }
    />
  );
}

And each BugList should look basically like this, sorted by points, then by priority.

OMC-123

[check all] 3 bugs | 13 points
Bug Title Assignee Iteration Priority Points
[ ] 1234 567 Lorem ipsum yozhang 118.1 P2 7
[ ] 2345 678 📋 dolor sit amet shughes 118.1 P1 3
[ ] 3456 789 consectetur pdahiya 118.1 P1 3

The BugLists themselves should be sorted by total points. So I think you could basically do

lists.sort((a, b) => {
  return (
    b.props.bugs.reduce((acc, bug) => acc + bug.points.value, 0) -
    a.props.bugs.reduce((acc, bug) => acc + bug.points.value, 0)
  );
});
@aminomancer aminomancer changed the title Add an OMC Tickets view Add a Jira Tickets view Aug 3, 2023
This was referenced Aug 3, 2023
yoenzhang added a commit that referenced this issue Aug 10, 2023
yoenzhang added a commit that referenced this issue Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant