← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~sam92/openlp/2.0-bug-1310523 into lp:openlp/2.0

 

Samuel Mehrbrodt has proposed merging lp:~sam92/openlp/2.0-bug-1310523 into lp:openlp/2.0.

Requested reviews:
  OpenLP Core (openlp-core)
Related bugs:
  Bug #1310523 in OpenLP: "Can't display songs that have more than 26 verses named equally"
  https://bugs.launchpad.net/openlp/+bug/1310523

For more details, see:
https://code.launchpad.net/~sam92/openlp/2.0-bug-1310523/+merge/216579

Fix bug 1310523 by restarting the alphabet after z (v1y, v1z, v1a)
-- 
https://code.launchpad.net/~sam92/openlp/2.0-bug-1310523/+merge/216579
Your team OpenLP Core is requested to review the proposed merge of lp:~sam92/openlp/2.0-bug-1310523 into lp:openlp/2.0.
=== modified file 'openlp/plugins/songs/lib/xml.py'
--- openlp/plugins/songs/lib/xml.py	2014-01-14 19:25:18 +0000
+++ openlp/plugins/songs/lib/xml.py	2014-04-21 09:42:51 +0000
@@ -360,9 +360,9 @@
             verse_tag = verse[0][u'type'][0].lower()
             verse_number = verse[0][u'label']
             verse_def = verse_tag + verse_number
+            # Create the letter from the number of duplicates
+            verse[0][u'suffix'] = chr(97 + (verse_tags.count(verse_def) % 26))
             verse_tags.append(verse_def)
-            # Create the letter from the number of duplicates
-            verse[0][u'suffix'] = chr(96 + verse_tags.count(verse_def))
         # If the verse tag is a duplicate use the suffix letter
         for verse in verse_list:
             verse_tag = verse[0][u'type'][0].lower()


Follow ups