[mb-commits] branch, mbs-5698, created. MBS-5698: Display historic 'move disc ID' edits correctly
MusicBrainz Git Server <[email protected]> Fri, 25 Jan 2013 11:51:06 +0000
| Newsgroups | gmane.comp.audio.musicbrainz.cvs |
|---|---|
| Message-ID | <E1TyhoI-0006LH-Fo@wiley> |
The branch, mbs-5698 has been created
at a06c74a7a5580eeb9b1763c9abdfcb444301a383 (commit)
- Log -----------------------------------------------------------------
commit a06c74a7a5580eeb9b1763c9abdfcb444301a383
Author: Oliver Charles <[email protected]>
Date: Fri Jan 25 11:50:48 2013 +0000
MBS-5698: Display historic 'move disc ID' edits correctly
When the migration script ran, it attempt to resolve a release ID into the set
of release IDs that the release was migrated to in NES (as multiple release
events produced a new release ID). However, if this resolution couldn't be done
because the release was deleted since the edit, the result was the empty set.
When displaying the from/to release set in the edit display, we now check for
whether or not the release set is the empty set and if so display
'[removed]'. Otherwsie, we show all the releases.
diff --git a/root/edit/details/historic/move_disc_id.tt b/root/edit/details/historic/move_disc_id.tt
index e62778e..9635cf5 100644
--- a/root/edit/details/historic/move_disc_id.tt
+++ b/root/edit/details/historic/move_disc_id.tt
@@ -7,22 +7,31 @@
<tr>
<th>[% l('From:') %]</th>
<td>
- <ul>
- [% FOR release=edit.display_data.old_releases %]
- <li>[% descriptive_link(release) %]</li>
- [% END %]
- </ul>
+ [% IF edit.display_data.old_releases.size %]
+ <ul>
+ [% FOR release=edit.display_data.old_releases %]
+ <li>[% release %]</li>
+ <li>[% descriptive_link(release) %]</li>
+ [% END %]
+ </ul>
+ [% ELSE %]
+ [% link_deleted(undef, undef) %]
+ [% END %]
</td>
</tr>
<tr>
<th>[% l('To:') %]</th>
<td>
- <ul>
- [% FOR release=edit.display_data.new_releases %]
- <li>[% descriptive_link(release) %]</li>
- [% END %]
- </ul>
+ [% IF edit.display_data.new_releases.size %]
+ <ul>
+ [% FOR release=edit.display_data.new_releases %]
+ <li>[% descriptive_link(release) %]</li>
+ [% END %]
+ </ul>
+ [% ELSE %]
+ [% link_deleted(undef, undef) %]
+ [% END %]
</td>
</tr>
</table>
-----------------------------------------------------------------------
hooks/post-receive
--
mb_server