Here's the code that worked to load only issues from the latest version in the issuelist by default.
It's a bit of a hack cause we shouldn't be modifying the variable $vbulletin->GPC['appliesversionid'], but it works!
PHP Code:
if (empty($vbulletin->GPC['appliesversionid']))
{
$version = $db->query_first("SELECT projectversionid " .
"FROM pt_projectversion " .
"WHERE projectid = $project " .
"ORDER BY effectiveorder DESC LIMIT 1");
$vbulletin->GPC['appliesversionid'] = "v".$version['projectversionid'];
}
The above should be placed just after the code below -
PHP Code:
if ($_REQUEST['do'] == 'issuelist')
{
$vbulletin->input->clean_array_gpc('r', array(
'projectid' => TYPE_UINT,
'issuetypeid' => TYPE_NOHTML,
'appliesversionid' => TYPE_NOHTML,
'issuestatusid' => TYPE_INT,
'pagenumber' => TYPE_UINT,
'sortfield' => TYPE_NOHTML,
'sortorder' => TYPE_NOHTML
));
$project = verify_project($vbulletin->GPC['projectid']);