Making WordPress.org

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#2033 closed enhancement (fixed)

Add various Trac reports to meta.trac.wordpress.org

Reported by: netweb's profile netweb Owned by:
Milestone: Priority: normal
Component: Trac Keywords:
Cc:

Description

https://core.trac.wordpress.org/report has more Trac reports available than https://meta.trac.wordpress.org/report

It would be sweet to get a couple of these added here on meta Trac :)

The couple of interest to me right this moment are:

Change History (9)

#1 @netweb
8 years ago

https://core.trac.wordpress.org/report/25 {25} My Patches

-- ## 25: My Patches ## --

-- {{{
-- #!span class="create-new-ticket button button-large button-primary"
-- [https://login.wordpress.org/?redirect_to=https://meta.trac.wordpress.org/newticket Create a new ticket]
-- }}}
-- 
--  * Tickets that you've contributed a patch to
--  * Sort by component, type, summary
--  * Accepted tickets have an '*' appended to their owner's name
-- 
-- ,,Hidden feature: /my-patches?USER=$name pulls up someone else's patch list.,,

SELECT
  CASE
  WHEN keywords LIKE '%needs_unit_tests%' OR keywords LIKE '%needs_docs%'
  THEN 3
  WHEN keywords LIKE '%close%' OR keywords LIKE '%needs_review%'
    OR keywords LIKE '%dev_feedback%' OR keywords LIKE '%2nd_opinion%'
  THEN 2
  WHEN keywords LIKE '%reporter_feedback%'
  THEN 3
  WHEN keywords LIKE '%commit%' OR keywords LIKE '%tested%'
  THEN 1
  WHEN keywords LIKE '%early%'
  THEN 2
  ELSE 3
  END as __color__,
  CASE
  WHEN milestone <= ( SELECT min(name) FROM milestone WHERE completed = 0 AND name NOT LIKE '%.%.%' )
  THEN 'Next Release'
  ELSE 'Future Releases'
  END as __group__,
  t.id AS ticket,
  summary,
  CASE
  WHEN status = 'accepted'
  THEN t.owner || '*'
  WHEN t.owner <> 'anonymous'
  THEN t.owner
  ELSE ''
  END as owner,
  component,
  version as _version,
  priority as priority,
  severity,
  milestone as milestone,
  t.type AS type,
  status AS _status,
  CASE
  WHEN keywords LIKE '%needs_unit_tests%'
  THEN 'needs-unit-tests'
  WHEN keywords LIKE '%needs_docs%'
  THEN 'needs-docs'
  WHEN keywords LIKE '%close%'
  THEN 'close'
  WHEN keywords LIKE '%needs_review%'
  THEN 'needs-review'
  WHEN keywords LIKE '%dev_feedback%' OR keywords LIKE '%2nd_opinion%'
  THEN 'dev-feedback'
  WHEN keywords LIKE '%reporter_feedback%'
  THEN 'reporter-feedback'
  WHEN keywords LIKE '%commit%'
  THEN 'commit'
  WHEN keywords LIKE '%tested%'
  THEN 'tested'
  WHEN keywords LIKE '%has_patch%'
    OR keywords LIKE '%needs_testing%' AND keywords NOT LIKE '%needs_patch%'
  THEN 'has-patch'
  WHEN keywords LIKE '%early%'
  THEN 'early'
  ELSE ''
  END as workflow,
  t.time AS _created,
  changetime AS modified,
  t.description AS _description,
  reporter AS _reporter
FROM ticket t
JOIN attachment a
  ON a.type = 'ticket' AND a.id = t.id AND LOWER(author) = LOWER($USER)
  AND ( filename LIKE '%.diff' OR filename LIKE '%.patch' )
  WHERE status <> 'closed'
GROUP BY t.id
ORDER BY
  milestone <= ( SELECT min(name) FROM milestone WHERE completed = 0 AND name NOT LIKE '%.%.%' ) DESC,
  Component, t.type, summary

#2 @netweb
8 years ago

https://core.trac.wordpress.org/report/29 {29} Open Tickets with patches from you

-- ## 29: Open Tickets with patches from you ## --

-- {{{
-- #!span class="create-new-ticket button button-large button-primary"
-- [https://login.wordpress.org/?redirect_to=https://meta.trac.wordpress.org/newticket Create a new ticket]
-- }}}
-- 
-- This report highlights any tickets which the current user has added patches on, Yet the ticket remains open.
-- 
-- By default, It shows for the current user, however, you may define it via the URL as such: http://core.trac.wordpress.org/report/29?USER=dd32
-- 
-- Coloured rows are those where the ticket has been marked as needing a patch.

SELECT
  a.filename as `_filename`,
  t.id as ticket,
  CASE
    WHEN milestone = 'Future Release'
      THEN 'Future'
    ELSE milestone
   END as Milestone,
  status || ' ' || t.type as type,
  summary,
  CASE
    WHEN keywords LIKE '%commit%'
      THEN 'commit'
    WHEN keywords LIKE '%dev_feedback%'
      THEN 'dev-feedback'
    WHEN keywords LIKE '%2nd_opinion%'
      THEN '2nd-opinion'
    WHEN keywords LIKE '%reporter_feedback%'
      THEN 'reporter-feedback'
    WHEN keywords LIKE '%tested%'
      THEN 'tested'
    WHEN keywords LIKE '%needs_testing%'
      THEN 'needs-testing'
    WHEN keywords LIKE '%has_patch%'
      THEN 'has-patch'
    ELSE 'needs-patch'
  END as workflow,
  CASE
    WHEN keywords LIKE '%%needs-patch%%' OR keywords = ''
      THEN 'background: #ffcc66;'
    ELSE ''
   END as __style__,
  component,
  version,
  severity,
  priority,
  a.time AS modified,
  t.description as _description

FROM
  attachment as a
  LEFT JOIN ticket as t ON a.id = t.id

WHERE
  LOWER(a.Author) = LOWER('$USER')
  AND t.status != 'closed'

GROUP BY t.id

ORDER BY
  t.milestone ASC,
  a.time DESC,
  t.version ASC

#3 in reply to: ↑ description ; follow-up: @netweb
8 years ago

I copied the core trac reports here, it looks like no changes would be necessary to the SQL, the only change I made was to the Trac URL to reference meta.trac.wordpress.org rather than core.trac.wordpress.org

#4 in reply to: ↑ 3 ; follow-ups: @SergeyBiryukov
8 years ago

Replying to netweb:

I copied the core trac reports here, it looks like no changes would be necessary to the SQL

The existing My Tickets report is actually quite different from the Core one, as Meta Trac doesn't use the same milestones or most of the keywords, but relies on component and priority instead.

So I've used that report as a base for the new ones:

If someone has direct access to the database, it would be great to change the IDs so that "My Patches" comes directly after "My Tickets", like on Core Trac :)

#5 in reply to: ↑ 4 @netweb
8 years ago

Replying to SergeyBiryukov:

Replying to netweb:

I copied the core trac reports here, it looks like no changes would be necessary to the SQL

The existing My Tickets report is actually quite different from the Core one, as Meta Trac doesn't use the same milestones or most of the keywords, but relies on component and priority instead.

Oh, sorry, I should have looked closer but it was all going to be speculation on my part without being able to try the SQL queries here myself anyway :/

So I've used that report as a base for the new ones:

Thanks Sergey :)

#6 @ocean90
8 years ago

  • Type changed from defect to enhancement

#7 @ocean90
8 years ago

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

#8 in reply to: ↑ 4 ; follow-up: @SergeyBiryukov
8 years ago

If someone has direct access to the database, it would be great to change the IDs so that "My Patches" comes directly after "My Tickets", like on Core Trac :)

@ocean90 Any chance to do that?

#9 in reply to: ↑ 8 @ocean90
8 years ago

Replying to SergeyBiryukov:

@ocean90 Any chance to do that?

Not really. You could delete the reports and re-add them in the order you want.

Note: See TracTickets for help on using tickets.