Finalize ticket relations (closes issue 638)
- IssueUpdate.php: use dynamically set field validators for dynamically created fields; let relation_type0 and relation_issue0 exist at any time; check the validity of a user selection and combine the various input fields if possible; do the database updates for links; change the "change" format for labels to a more precise structure and no longer trust on a leading dash for removed labels - IssueCreate.php: change the validator calls and field names - Issue.php (getGroupedRelatedIssues): make it possible to return only a flat list of integers for easier processing - 17AddIssueRelations.php: migrate the previous serialized "changes" format for issue comments to the new, more structured format (up and down) - js-autocomplete.html: add support for multiple input fields - view.html: output relation changes and wrap the related issues stanzas into paragraphs - NEWS.mdtext: note the addition and the need for a specific version of Pluf
This commit is contained in:
@@ -40,7 +40,16 @@
|
||||
{if $i> 0 and $c.changedIssue()}
|
||||
<div class="issue-changes">
|
||||
{foreach $c.changes as $w => $v}
|
||||
<strong>{if $w == 'su'}{trans 'Summary:'}{/if}{if $w == 'st'}{trans 'Status:'}{/if}{if $w == 'ow'}{trans 'Owner:'}{/if}{if $w == 'lb'}{trans 'Labels:'}{/if}</strong> {if $w == 'lb'}{assign $l = implode(', ', $v)}{$l}{else}{$v}{/if}<br />
|
||||
<strong>{if $w == 'su'}{trans 'Summary:'}{/if}{if $w == 'st'}{trans 'Status:'}{/if}{if $w == 'ow'}{trans 'Owner:'}{/if}{if $w == 'lb'}{trans 'Labels:'}{/if}{if $w == 'rel'}{trans 'Relations:'}{/if}</strong>
|
||||
{if $w == 'lb' or $w == 'rel'}
|
||||
{foreach $v as $t => $ls}
|
||||
{foreach $ls as $l}
|
||||
{if $t == 'rem'}<s>{/if}{$l}{if $t == 'rem'}</s> {/if}
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
{else}
|
||||
{$v}
|
||||
{/if}<br />
|
||||
{/foreach}
|
||||
</div>
|
||||
{/if}
|
||||
@@ -120,12 +129,20 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$form.f.relation_type.labelTag}:</th>
|
||||
<th>{$form.f.relation_type0.labelTag}:</th>
|
||||
<td>
|
||||
{if $form.f.relation_type.errors}{$form.f.relation_type.fieldErrors}{/if}
|
||||
{if $form.f.relation_issue.errors}{$form.f.relation_issue.fieldErrors}{/if}
|
||||
{$form.f.relation_type|unsafe}
|
||||
{$form.f.relation_issue|unsafe}
|
||||
{assign $prevField}
|
||||
{foreach $form as $field}
|
||||
{if strpos($field.name, 'relation_type') === 0}
|
||||
{$field|unsafe}
|
||||
{assign $prevField = $field}
|
||||
{/if}
|
||||
{if strpos($field.name, 'relation_issue') === 0}
|
||||
{$field|unsafe}<br />
|
||||
{if $prevField.errors}{$prevField.fieldErrors}{/if}
|
||||
{if $field.errors}{$field.fieldErrors}{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -172,15 +189,17 @@
|
||||
</p>{/if}
|
||||
{if count($related_issues) > 0}
|
||||
{foreach $related_issues as $verb => $rel_issues}
|
||||
<p>
|
||||
<strong>{blocktrans}This issue {$verb}{/blocktrans}</strong><br />
|
||||
{foreach $rel_issues as $rel_issue}
|
||||
<span class="label">
|
||||
<a href="{url 'IDF_Views_Issue::view', array($project.shortname, $rel_issue.other_issue)}"
|
||||
title="{$rel_issue.other_summary}">
|
||||
class="label" title="{$rel_issue.other_summary}">
|
||||
<strong>{$rel_issue.other_issue}</strong> - {$rel_issue.other_summary|shorten:30}
|
||||
</a>
|
||||
</span><br />
|
||||
{/foreach}
|
||||
</p>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user