• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

allura


Commit MetaInfo

修訂cf12fe05528f87acbdafe55ab1e9aec05719a6fb (tree)
時間2010-10-13 01:58:50
作者Jenny Steele <jsteele@geek...>
CommiterJenny Steele

Log Message

Fix for labels

Change Summary

差異

--- a/Allura/allura/lib/widgets/templates/label_edit.html
+++ b/Allura/allura/lib/widgets/templates/label_edit.html
@@ -1,3 +1,3 @@
11 <div>
2- <input id="{{name}}" name="{{name}}" type="text" value="{{value or ''}}" class="label_edit {{className}}" />
2+ <input id="{{name}}" name="{{name}}" type="text" value="{{value and ','.join(value) or ''}}" class="label_edit {{className}}" />
33 </div>
--- a/ForgeTracker/forgetracker/model/ticket.py
+++ b/ForgeTracker/forgetracker/model/ticket.py
@@ -353,10 +353,10 @@ class Ticket(VersionedArtifact):
353353
354354 def update(self,ticket_form):
355355 self.globals.invalidate_bin_counts()
356- tags = (ticket_form.pop('tags', None) or '').split(',')
356+ tags = (ticket_form.pop('tags', None) or '')
357357 if tags == ['']:
358358 tags = []
359- labels = (ticket_form.pop('labels', None) or '').split(',')
359+ labels = (ticket_form.pop('labels', None) or '')
360360 if labels == ['']:
361361 labels = []
362362 self.labels = labels
--- a/ForgeTracker/forgetracker/tests/functional/test_root.py
+++ b/ForgeTracker/forgetracker/tests/functional/test_root.py
@@ -114,8 +114,7 @@ class TestFunctionalController(TestController):
114114 'status':'ccc',
115115 'milestone':'',
116116 'assigned_to':'',
117- 'labels-0':'yellow',
118- 'labels-1':'green',
117+ 'labels':'yellow,green',
119118 'labels_old':'yellow,green'
120119 })
121120 response = self.app.get('/bugs/1/')
@@ -127,7 +126,7 @@ class TestFunctionalController(TestController):
127126 'status':'ccc',
128127 'milestone':'',
129128 'assigned_to':'',
130- 'labels-0':'yellow',
129+ 'labels':'yellow',
131130 'labels_old':'yellow'
132131 })
133132 response = self.app.get('/bugs/1/')
--- a/ForgeTracker/forgetracker/tracker_main.py
+++ b/ForgeTracker/forgetracker/tracker_main.py
@@ -699,6 +699,10 @@ class TicketController(BaseController):
699699 flash('You must provide a Name')
700700 redirect('.')
701701 c.app.globals.invalidate_bin_counts()
702+ if 'labels' in post_data:
703+ post_data['labels'] = post_data['labels'].split(',')
704+ else:
705+ post_data['labels'] = []
702706 self._update_ticket(post_data)
703707
704708 @expose()