I know that I'm not the only one doing this, but I've done it a few times lately. The example I provide below is a case where I did it, but simply by following @platch who had made the mistake earlier. It's easy to do when you're juggling numerous tabs & issues.
When entering in a Related issues in the issue queue, one should not be able to enter in the issue that you're currently on. Probably easier to just insert a check so that there is a warning/error.
I posted about it here in a bit more depth (after being corrected):
#1833196-9: could not have interface in language A and create a translation from language B to language C
It would be pretty easy I think to find how many times this has been done in d.o, but probably just better to make sure it can't happen into the future.
It's annoying for everyone.
Comment | File | Size | Author |
---|---|---|---|
Screen Shot 2014-10-05 at 9.47.51 AM.png | 237.27 KB | mgifford |
Comments
Comment #1
drummThe Entity Reference selection handler for these fields is at http://cgit.drupalcode.org/project_issue/tree/plugins/entityreference_se...
Comment #2
mgiffordThanks @drumm - I thought about listing it there but wasn't sure in the end.
Comment #3
tvn CreditAttribution: tvn at Drupal Association commentedComment #4
dwwVery reasonable proposal. In fact, allowing circular references seems like a bug.
However, inside
ProjectIssue_SelectionHandler_Issues::getReferencableEntities()
I'm poking around in the contents of$this
and I don't see any way to figure out what the current issue nid actually is. :/$this->entity
exists, but it's NULL. Looking at the rest of the data, there's nothing in there that seems to point to the entity that the entityreference field is attached to. :/ Without that data, there doesn't seem to be a clean way to enforce this. I suppose we could do something unholy like menu_get_object() or arg() et al, but that seems so wrong on many levels. WTF? There must be a better way to do this, no?Comment #5
Liam MorlandLikewise, an issue should not be able to be its own parent.
Comment #6
apadernoComment #7
apaderno