Making WordPress.org

Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#5596 closed defect (bug) (fixed)

Trac: "My patches" report does not include GitHub PRs

Reported by: ryelle's profile ryelle Owned by: dd32's profile dd32
Milestone: Priority: low
Component: Trac Keywords: needs-dev-note
Cc:

Description

If I look for tickets I've worked on using this report: https://core.trac.wordpress.org/my-patches, I don't see the tickets that have github PRs attached.

For example, you can view the report for my username, and see that #47895 is not in the list.

I can see my own PRs on github, so there is a functional workaround, but it would be nice to have all in one place.

Change History (9)

#1 @dd32
4 years ago

That report is designed to pull directly from the attachmets trac table, and there's no DB table with a list of the PRs.

I guess we could do something like WHERE ticket_id IN ( tickets with attachments by $USER UNION tickets with comments by prbot containing data-wporg-user="$USER") which wouldn't be the best performance wise.. but.. might be okay.
(edit: Note that the PR prbot comments don't seem to include the wporg username of the PR submitter right now :( I thought it was supposed to.. )

The other lazier option, would be to simply link off to api endpoint which redirects back to something like this for the GitHub PR'd tickets.

Last edited 4 years ago by dd32 (previous) (diff)

#2 @dd32
3 years ago

#6030 was marked as a duplicate.

#3 follow-ups: @Mte90
3 years ago

Another idea, create automatically a patch to the ticket from github PR?
In this way a patch exists also if not updated and the attachment exists too.
Or create an attachment that is not showed in the page.

PS: I don't know how trac works just some ideas.

#4 in reply to: ↑ 3 @dd32
3 years ago

Meta variant of the report: https://meta.trac.wordpress.org/report/12

#5 @dd32
3 years ago

  • Owner set to dd32
  • Resolution set to fixed
  • Status changed from new to closed

In 11544:

Trac: Add the ability to include Tickets that you've added a GitHub PR to, in the 'my patches' reports.

See https://core.trac.wordpress.org/my-patches + https://meta.trac.wordpress.org/report/12
Fixes #5596.

#6 in reply to: ↑ 3 @dd32
3 years ago

Replying to Mte90:

Another idea, create automatically a patch to the ticket from github PR?

Thanks for the suggestion! I actually looked at doing just that back when I added GitHub PR linking, unfortunately the builtin Trac API doesn't allow creating uploads.. and I don't have an urgent want to write that functionality into Trac :)


The above commit has added this with an extra UI step & page reload, which ain't the greatest, but ain't the worst. The page still works without the linked PRs without the reload though.

The worst part is that when you add a new PR, it won't be reflected on the page until after you clear the GITHUBTICKETS=... URL param (or load the report from scratch again).. but that's not a major issue considering the point of the page is to find those tickets you've contributed to previously.

#7 follow-up: @Mte90
3 years ago

Cool but I don't see the field on Core my-patches page but only on meta.
Maybe a post on core that explain the new feature?

#8 in reply to: ↑ 7 @dd32
3 years ago

Replying to Mte90:

Cool but I don't see the field on Core my-patches page but only on meta.

It takes several hours for Trac to refresh the JS sometimes (It caches the template html for something silly like 10,000 page loads), so you can often see changes reflect on one trac before others, and then the multiple trac processes refresh their caches at different times, so you can reload and get old html, then new html, etc...

And yeah, a make post would be worthwhile for this, I've made a few changes this week I'd like to post about and get feedback on (ie. see if anyone has noticed the change, etc.)

#9 @dd32
3 years ago

  • Keywords needs-dev-note added
Note: See TracTickets for help on using tickets.