Author: matevz
Date: Fri Aug 9 09:35:50 2013
New Revision: 1512221
URL: http://svn.apache.org/r1512221
Log:
#629 - Fix ambiguity of ticket relations
Modified:
bloodhound/trunk/bloodhound_relations/bhrelations/templates/manage.html
bloodhound/trunk/bloodhound_relations/bhrelations/tests/base.py
bloodhound/trunk/bloodhound_relations/bhrelations/web_ui.py
bloodhound/trunk/installer/bloodhound_setup.py
Modified:
bloodhound/trunk/bloodhound_relations/bhrelations/templates/manage.html
URL:
http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_relations/bhrelations/templates/manage.html?rev=1512221&r1=1512220&r2=1512221&view=diff
==============================================================================
--- bloodhound/trunk/bloodhound_relations/bhrelations/templates/manage.html
(original)
+++ bloodhound/trunk/bloodhound_relations/bhrelations/templates/manage.html Fri
Aug 9 09:35:50 2013
@@ -47,27 +47,27 @@
<form id="addrelation" class="well form-horizontal" method="post"
action="">
<fieldset>
- <legend>Add relation:</legend>
+ <legend>Add relation</legend>
</fieldset>
<div class="control-group">
- <label class="control-label" for="dest_tid">Related ticket:</label>
+ <label class="control-label" for="reltype">This ticket</label>
<div class="controls">
- <input type="text" id="dest_tid" class="span4" name="dest_tid"
value="$relation.destination" />
+ <select class="span4" id="reltype" name="reltype">
+ <option py:for="reltype,label in reltypes" value="$reltype"
selected="${True if reltype == relation.type else None}">$label</option>
+ </select>
</div>
</div>
<div class="control-group">
- <label class="control-label" for="reltype">Relation type:</label>
+ <label class="control-label" for="dest_tid">Related ticket</label>
<div class="controls">
- <select class="span4" id="reltype" name="reltype">
- <option py:for="reltype,label in reltypes.iteritems()"
value="$reltype" selected="${True if reltype == relation.type else
None}">$label</option>
- </select>
+ <input type="text" id="dest_tid" class="span4" name="dest_tid"
value="$relation.destination" />
</div>
</div>
<div class="control-group">
- <label class="control-label" for="comment">Comment:</label>
+ <label class="control-label" for="comment">Comment</label>
<div class="controls">
<textarea name="comment" rows="3"
class="span4">${relation.comment}</textarea>
</div>
Modified: bloodhound/trunk/bloodhound_relations/bhrelations/tests/base.py
URL:
http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_relations/bhrelations/tests/base.py?rev=1512221&r1=1512220&r2=1512221&view=diff
==============================================================================
--- bloodhound/trunk/bloodhound_relations/bhrelations/tests/base.py (original)
+++ bloodhound/trunk/bloodhound_relations/bhrelations/tests/base.py Fri Aug 9
09:35:50 2013
@@ -59,8 +59,8 @@ class BaseRelationsTestCase(Multiproduct
env.config.set(config_name, 'oneway', 'refersto')
env.config.set(config_name, 'duplicate', 'duplicateof,duplicatedby')
env.config.set(config_name, 'duplicate.validators', 'ReferencesOlder')
- env.config.set(config_name, 'duplicateof.label', 'Duplicate of')
- env.config.set(config_name, 'duplicatedby.label', 'Duplicated by')
+ env.config.set(config_name, 'duplicateof.label', 'is a duplicate of')
+ env.config.set(config_name, 'duplicatedby.label', 'duplicates')
env.config.set(config_name, 'blocker', 'blockedby,blocks')
env.config.set(config_name, 'blockedby.blocks', 'true')
Modified: bloodhound/trunk/bloodhound_relations/bhrelations/web_ui.py
URL:
http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_relations/bhrelations/web_ui.py?rev=1512221&r1=1512220&r2=1512221&view=diff
==============================================================================
--- bloodhound/trunk/bloodhound_relations/bhrelations/web_ui.py (original)
+++ bloodhound/trunk/bloodhound_relations/bhrelations/web_ui.py Fri Aug 9
09:35:50 2013
@@ -111,7 +111,8 @@ class RelationManagementModule(Component
data.update({
'ticket': ticket,
- 'reltypes': relsys.get_relation_types(),
+ 'reltypes': sorted(relsys.get_relation_types().iteritems(),
+ key=lambda x: x[0]),
'relations': self.get_ticket_relations(ticket),
})
return 'manage.html', data, None
Modified: bloodhound/trunk/installer/bloodhound_setup.py
URL:
http://svn.apache.org/viewvc/bloodhound/trunk/installer/bloodhound_setup.py?rev=1512221&r1=1512220&r2=1512221&view=diff
==============================================================================
--- bloodhound/trunk/installer/bloodhound_setup.py (original)
+++ bloodhound/trunk/installer/bloodhound_setup.py Fri Aug 9 09:35:50 2013
@@ -97,22 +97,23 @@ BASE_CONFIG = {'components': {'bhtheme.*
'duplicateof',
},
'bhrelations_links': {
- 'children.label': 'Child',
+ 'children.label': 'is a child of',
'dependency': 'dependson,dependent',
'dependency.validators': 'NoCycles,SingleProduct',
'dependson.blocks': 'true',
- 'dependson.label': 'Depends on',
- 'dependent.label': 'Dependent',
+ 'dependson.label': 'depends on',
+ 'dependent.label': 'is a dependency of',
'oneway': 'refersto',
'parent_children': 'parent,children',
'parent.exclusive': 'true',
+ 'parent.label': 'is a parent of',
'parent_children.validators':
'OneToMany,SingleProduct,NoCycles',
- 'refersto.label': 'Refers to',
+ 'refersto.label': 'refers to',
'duplicate': 'duplicateof,duplicatedby',
'duplicate.validators': 'ReferencesOlder',
- 'duplicateof.label': 'Duplicate of',
- 'duplicatedby.label': 'Duplicated by',
+ 'duplicateof.label': 'is a duplicate of',
+ 'duplicatedby.label': 'is duplicated by',
},
}