Group PRs under the issue that it closes#452
Group PRs under the issue that it closes#452IzN432 wants to merge 13 commits intoCATcher-org:mainfrom
Conversation
|
The way this is implemented currently may cause some confusion when there are multiple issues closed by the PR or multiple PRs that close the issue. But for non anomalous usage, I think this implementation should be sufficient. Open to any suggestions if you guys have any ideas. |
|
I've looked through the code, the current code 'groups' PR by looking at issues in the same issueDataTable. However, the nature of PRs is that the person fixing the issue might not be the one who created the issue. Thus, a more appropriate way might be to modify cardview to host a sublist of issues/prs and the content can be displayed roughly like so (in psudo code): The data transformation can be done globally (ie before data is grouped in issueDataTable). Transformation sketch data : Issue[]
const numToIssuesMap = new Map<number, Issue>();
const issuesToPrMap = new Map<number, Issue[]>();
for (const issue of data) {
numToIssuesMap.set(issue.id, issue);
if (issue.issueOrPr == 'Issue') {
issueIds.set(issue.id, []);
}
}
for (const pr of data) {
if (pr.issueOrPr == 'Issue') {
continue;
}
for (const issueId of pr.closingIssuesReferences) {
issueToPrMap.get(issueId)?.push(pr);
}
}
// transform into card dataIn a similar fashion, this approach can also be used to display all issues that a PR resolves on WATcher. I would suggest making them collapsible on default to prevent overcrowding the UI. This logic can be incorporated into Since this is an alternative approach to the current solution, it would be beneficial to create a separate PR to investigate and compare both approaches before deciding whether to adopt this solution. What do you think? |
|
The issues being displayed under each assignee is the issues that are assigned to them, rather than the issues they create. In this case, PRs that close issues that are not assigned to the creator of the PR are considered anomalies, so I believe prof wants a way to identify these on glance (which would be PRs not under any issues). |
Summary:
Fixes #444
Type of change:
Changes Made:
Move PRs to below the issue that they close
This is performed after filtering and sorting in the IssueDataTable.ts. It is implemented such that for each PR in the list, we move it to underneath the first issue that the PR closes, that does not have a PR attached to it yet.
Add a select form field for this behaviour in the filter
Screenshots:
Proposed Commit Message:
Checklist: