Parent wrongly translated to "subproject of"
|Status:||Needs feedback||Start date:|
#1 Updated by Mischa The Evil about 1 year ago
- Status changed from New to Needs feedback
I don't see what's wrong with this. It expresses exactly what it is supposed to do. See the following ASCII:
=========================================================== Two root projects, X and Y: =========================================================== /-------\ /-------\ | X | | Y | \-------/ \-------/ X and Y have no parent = both are not sub-projects of (an)other project(s) =========================================================== One root project, X, and one subproject, Y =========================================================== /-------\ | X | \-------/ | v /-------\ | Y | \-------/ X has no parent = is not a sub-project of another project Y has parent, X = is a sub-project of (parent) project, X
#2 Updated by Txinto Vaz about 1 year ago
Well, I've tried to override the validate_issue at issue.rb. I was trying to force the presence of parent issue. I used the validates prsence of parent , and then when it failed, instead of telling "parent issue is blank", the message was "subproject of is blank".
Maybe the translation is ok, but then the validation is raising
errors.add :field_parent, :blank
errors.add :parent_issue_id, :blank
#3 Updated by Txinto Vaz about 1 year ago
That wss the line. Now I am doing it in another way and it works for me, but when I put this here, the message was not "parent issue is blank", the message was "Subproject of is blank" when no parent issue is set. When I fixed the parent issue, the error dissapeared as expected. The only strange behaviour is the message displayed on that error, because I am not handling projects, just issues.
So, from my opinion, if there is no translation error, then the validates presence of is calling to the wrong message when validation fails.
I've tried to sniff the code to see when the error is raised, but my Rails knowledge is not so strong.