#629: Fix ambiguity of ticket relations
------------------------+-----------------------
  Reporter:  matevzb    |      Owner:  matevzb
      Type:  defect     |     Status:  closed
  Priority:  major      |  Milestone:  Release 7
 Component:  relations  |    Version:  0.6.0
Resolution:  fixed      |   Keywords:
------------------------+-----------------------

Comment (by rjollos):

 Adding the `bhrelations_links` section is a bit more complex, but for the
 `bhrelations` section the configuration applied in `bloodhound_setup.py`
 could set as the default values for the options:

 {{{#!patch
 Index: installer/bloodhound_setup.py
 ===================================================================
 --- installer/bloodhound_setup.py       (revision 1513008)
 +++ installer/bloodhound_setup.py       (working copy)
 @@ -89,13 +89,6 @@
                            'footer_left_postfix': '',
                            'footer_right': ''},
                 'bhsearch': {'is_default': 'true', 'enable_redirect':
 'true'},
 -               'bhrelations': {
 -                   'global_validators':
 -                       'NoSelfReferenceValidator,ExclusiveValidator,'
 -                       'BlockerValidator',
 -                   'duplicate_relation':
 -                        'duplicateof',
 -               },
                 'bhrelations_links': {
                      'children.label': 'is a child of',
                      'dependency': 'dependson,dependent',
 Index: bloodhound_relations/bhrelations/api.py
 ===================================================================
 --- bloodhound_relations/bhrelations/api.py     (revision 1513008)
 +++ bloodhound_relations/bhrelations/api.py     (working copy)
 @@ -168,8 +168,9 @@
      all_validators = ExtensionPoint(IRelationValidator)
      global_validators = OrderedExtensionsOption(
          'bhrelations', 'global_validators',
 -        interface=IRelationValidator,
 -        include_missing=False,
 +        IRelationValidator,
 +        'NoSelfReferenceValidator, ExclusiveValidator, BlockerValidator',
 +        False,
          doc="""Validators used to validate all relations,
          regardless of their type."""
      )
 @@ -177,7 +178,7 @@
      duplicate_relation_type = Option(
          'bhrelations',
          'duplicate_relation',
 -        '',
 +        'duplicateof',
          "Relation type to be used with the resolve as duplicate
 workflow.")

      def __init__(self):
 }}}

-- 
Ticket URL: <https://issues.apache.org/bloodhound/ticket/629#comment:4>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker

Reply via email to