You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bloodhound.apache.org by Apache Bloodhound <de...@bloodhound.apache.org> on 2014/03/04 06:14:30 UTC
[Apache Bloodhound] #775: Can't create multiple "is a parent of"
relations
#775: Can't create multiple "is a parent of" relations
-----------------------+-----------------------
Reporter: rjollos | Owner: rjollos
Type: defect | Status: new
Priority: major | Milestone: Release 8
Component: relations | Version:
Keywords: |
-----------------------+-----------------------
To reproduce:
* Create tickets A, B, C
* Create a relation: ticket A //is a parent of// B
* Create a relation: ticket A //is a parent of// C
The following error results:
{{{#!html
<div class="alert alert-error"><span class="label label-important">Oops
!</span>
Could not create relation.
Resource <em>prod5:ticket:3</em> can only have one <b>is a
parent of</b> relation.</div>
}}}
It appears that the `OneToManyValidator` needs to be more specific with
regard to types of relations that it asserting on.
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/775>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #775: Can't create multiple "is a parent
of" relations
Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#775: Can't create multiple "is a parent of" relations
------------------------+------------------------
Reporter: rjollos | Owner: astaric
Type: defect | Status: closed
Priority: major | Milestone: Release 8
Component: relations | Version:
Resolution: fixed | Keywords: validation
------------------------+------------------------
Changes (by rjollos):
* owner: rjollos => astaric
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/775#comment:9>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #775: Can't create multiple "is a parent
of" relations
Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#775: Can't create multiple "is a parent of" relations
------------------------+------------------------
Reporter: rjollos | Owner: rjollos
Type: defect | Status: accepted
Priority: major | Milestone: Release 8
Component: relations | Version:
Resolution: | Keywords: validation
------------------------+------------------------
Comment (by rjollos):
The unit tests are passing now, but given the number of changes that
needed to be made and in light of comment:3, we should probably review all
of the unit tests to be sure there aren't any false positives. Please feel
free to go ahead with that if you are inclined, otherwise I will pick it
up tomorrow. Thanks for your help!
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/775#comment:6>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #775: Can't create multiple "is a parent
of" relations
Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#775: Can't create multiple "is a parent of" relations
------------------------+------------------------
Reporter: rjollos | Owner: rjollos
Type: defect | Status: accepted
Priority: major | Milestone: Release 8
Component: relations | Version:
Resolution: | Keywords: validation
------------------------+------------------------
Comment (by astaric):
In r1574841 I refactored tests a bit, to make syntax for adding relations
clearer.
All relations in tests are now added using add_relation(ticket1, rel_type,
ticket2), meaning ticket1 is rel_type of ticket2. I checked that all
relations are now used correctly (no more inverted relations).
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/775#comment:7>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #775: Can't create multiple "is a parent
of" relations
Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#775: Can't create multiple "is a parent of" relations
------------------------+------------------------
Reporter: rjollos | Owner: rjollos
Type: defect | Status: accepted
Priority: major | Milestone: Release 8
Component: relations | Version:
Resolution: | Keywords: validation
------------------------+------------------------
Description changed by rjollos:
Old description:
> To reproduce:
> * Create tickets A, B, C
> * Create a relation: ticket A //is a parent of// B
> * Create a relation: ticket A //is a parent of// C
>
> The following error results:
> {{{#!html
> <div class="alert alert-error"><span class="label label-important">Oops
> !</span>
> Could not create relation.
> Resource <em>prod5:ticket:3</em> can only have one <b>is a
> parent of</b> relation.</div>
> }}}
>
> It appears that the `OneToManyValidator` needs to be more specific with
> regard to types of relations that it asserting on.
New description:
To reproduce:
* Create tickets A, B, C
* Create a relation: ticket A //is a parent of// B
* Create a relation: ticket A //is a parent of// C
The following error results:
{{{#!html
<div class="alert alert-error"><span class="label label-important">Oops
!</span>
Could not create relation.
Resource <em>prod5:ticket:3</em> can only have one <b>is a
parent of</b> relation.</div>
}}}
It appears that the `OneToManyValidator` needs to be more specific with
regard to type of relation that it is asserting on.
Proposals/BEP-0006#Constraints describes the requirement for the
OneToManyValidator: //Parent/child relationships should be "one-way" (i.e.
tree hierarchy, not a graph with backward relationships).// I interpret
this even more simply as, //a ticket cannot have multiple parents.//
For reference, the `OneToManyValidator` was implemented in [1483676] for
#528.
--
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/775#comment:2>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #775: Can't create multiple "is a parent
of" relations
Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#775: Can't create multiple "is a parent of" relations
------------------------+------------------------
Reporter: rjollos | Owner: rjollos
Type: defect | Status: accepted
Priority: major | Milestone: Release 8
Component: relations | Version:
Resolution: | Keywords: validation
------------------------+------------------------
Comment (by rjollos):
Replying to [comment:3 astaric]:
> It is checking whether there are existing relations with the same source
and type, where it should be checking if there are existing relations with
same type and destination. (source can point to many resources, but only
one resource should point to destination with this type)
Thanks, I've fixed it in the way you've described, but I appreciate the
confirmation and historical explanation because I had doubts. I have one
more unit test to fix and then I'll commit the change. I appreciate if you
can review so we can be sure I've fixed it correctly.
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/775#comment:4>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #775: Can't create multiple "is a parent
of" relations
Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#775: Can't create multiple "is a parent of" relations
------------------------+------------------------
Reporter: rjollos | Owner: rjollos
Type: defect | Status: closed
Priority: major | Milestone: Release 8
Component: relations | Version:
Resolution: fixed | Keywords: validation
------------------------+------------------------
Changes (by rjollos):
* status: accepted => closed
* resolution: => fixed
Comment:
I did some additional testing this evening and found no issues. Thanks!
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/775#comment:8>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #775: Can't create multiple "is a parent
of" relations
Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#775: Can't create multiple "is a parent of" relations
------------------------+------------------------
Reporter: rjollos | Owner: rjollos
Type: defect | Status: accepted
Priority: major | Milestone: Release 8
Component: relations | Version:
Resolution: | Keywords: validation
------------------------+------------------------
Comment (by astaric):
When the validator was written, parent relation was somewhat special. Two
relations were not isparentof and ischildof, but parent and children
(inverse of what are they now). This was consistent with the layout at the
time (name on the relation on left, followed by all relations of the
type).
When relation types were changed, validator was not. It is checking
whether there are existing relations with the same source and type, where
it should be checking if there are existing relations with same type and
destination. (source can point to many resources, but only one resource
should point to destination with this type)
If you have not started working on this, I can.
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/775#comment:3>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #775: Can't create multiple "is a parent
of" relations
Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#775: Can't create multiple "is a parent of" relations
------------------------+------------------------
Reporter: rjollos | Owner: rjollos
Type: defect | Status: accepted
Priority: major | Milestone: Release 8
Component: relations | Version:
Resolution: | Keywords: validation
------------------------+------------------------
Comment (by rjollos):
(In [1574802])
0.8dev: It was not possible to create multiple //is a parent of//
relations. Refs #775.
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/775#comment:5>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #775: Can't create multiple "is a parent
of" relations
Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#775: Can't create multiple "is a parent of" relations
------------------------+------------------------
Reporter: rjollos | Owner: rjollos
Type: defect | Status: accepted
Priority: major | Milestone: Release 8
Component: relations | Version:
Resolution: | Keywords: validation
------------------------+------------------------
Changes (by rjollos):
* status: new => accepted
* keywords: => validation
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/775#comment:1>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker