Making WordPress.org

Opened 6 years ago

#3751 new enhancement

create shortcode for formatting tickets in make/core release posts

Reported by: pbiron's profile pbiron Owned by:
Milestone: Priority: normal
Component: Make (Get Involved) / P2 Keywords: 2nd-opinion
Cc:

Description

The most tedious part of writing the make/core beta/rc/final release posts for 4.9.8 was formatting the list of tickets included in the release.

It would be great if there were a shortcode (and/or gutenberg block?) to do that formatting.

Here are a couple of suggestions for such a shortcode, other folks may have other suggestions.

Basic

[trac tickets='1234,5678,9012,3456,7890']

This would query trac for those ticket numbers, group them by component and then output something like:

<h3>Component X</h3>
<ul>
	<li><a href='https://core.trac.wordpress.org/ticket/1234'>#1234</a> - Ticket 1234 Summmary</a>
</ul>
<h3>Component Y</h3>
<ul>
	<li><a href='https://core.trac.wordpress.org/ticket/5678'>#5678</a> - Ticket 5768 Summmary</a>
	<li><a href='https://core.trac.wordpress.org/ticket/9012'>#9012</a> - Ticket 9012 Summmary</a>
</ul>
<h3>Component Z</h3>
<ul>
	<li><a href='https://core.trac.wordpress.org/ticket/3456'>#3456</a> - Ticket 3456 Summmary</a>
	<li><a href='https://core.trac.wordpress.org/ticket/7890'>#7890</a> - Ticket 7890 Summmary</a>
</ul>

This output seems typical for final release posts, see https://make.wordpress.org/core/2018/08/02/wordpress-4-9-8/.

Group By

[trac tickets='1234,5678,9012,3456,7890' group-by='type']

This would query trac for those ticket numbers, group them by ticket type (e.g., bug, enhancement, blessed task) and then further group by component and then output something like:

<h2>Bug Fixes</h2>
<h3>Component X</h3>
<ul>
	<li><a href='https://core.trac.wordpress.org/ticket/1234'>#1234</a> - Ticket 1234 Summmary</a>
</ul>
<h3>Component Y</h3>
<ul>
	<li><a href='https://core.trac.wordpress.org/ticket/5678'>#5678</a> - Ticket 5768 Summmary</a>
	<li><a href='https://core.trac.wordpress.org/ticket/9012'>#9012</a> - Ticket 9012 Summmary</a>
</ul>
<h2>Enhancements</h2>
<h3>Component Z</h3>
<ul>
	<li><a href='https://core.trac.wordpress.org/ticket/3456'>#3456</a> - Ticket 3456 Summmary</a>
	<li><a href='https://core.trac.wordpress.org/ticket/7890'>#7890</a> - Ticket 7890 Summmary</a>
</ul>

This output seems to be typical for beta1 and RC1 posts (see https://make.wordpress.org/core/2018/07/17/wordpress-4-9-8-beta-1/).

betaN/RCN

[trac tickets='1234,5678,9012,3456,7890' group-by='type' since='post_id']

This would produce output just like the [trac tickets='1234,5678,9012,3456,7890' group-by='type'] variation above but also include a link to the previous beta/RC post:

<h2>Bug Fixes</h2>
<p><em>The tickets listed below are only those committed since <a href='URL'>Post Title</a> was release</em>.</p>
<h3>Component X</h3>
<ul>
	<li>...</li>
</ul>
...

It seems typical that the posts for betaN/RCN (for N > 1) include only those tickets included since the previous beta/RC. This form of the shortcode would auto-generate the link to the previous release post (specified by since='post_id'), see https://make.wordpress.org/core/2018/07/19/wordpress-4-9-8-beta-2/

Pie in the Sky

Note: this one may not be possible because the data necessary to support it may not be in trac...or even if it is that data may be too "brittle" (see below).

[trac milestone='4.9.8' after='date-time-1' before='date-time-2' since='post_id']

This would produce the same output as the [trac tickets='1234,5678,9012,3456,7890' group-by='type' since='post_id'] variation above but wouldn't require the individual tickets to be listed. Instead, it would query trac for tickets in the given milestone that were closed/fixed between date-time-1 and date-time-2.

Even if the closed/fixed date/time is in trac, this probably wouldn't be good to do because a ticket can always be reopened after the fact so the output of this one could produce different results depending on when the post is viewed. I include it just in case someone knows a way around that particular possiblity.

Change History (0)

Note: See TracTickets for help on using tickets.