https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292020-05-08T21:14:25ZRedmineRedmine - Defect #33420: Parent wrongly translated to "subproject of"https://www.redmine.org/issues/33420?journal_id=977332020-05-08T21:14:25ZMischa The Evil
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Needs feedback</i></li></ul><p>I don't see what's wrong with this. It expresses exactly what it is supposed to do. See the following ASCII:</p>
<pre>
===========================================================
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
</pre> Redmine - Defect #33420: Parent wrongly translated to "subproject of"https://www.redmine.org/issues/33420?journal_id=977362020-05-09T02:02:31ZTxinto Vaz
<ul></ul><p>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".</p>
<p>Maybe the translation is ok, but then the validation is raising</p>
<p>errors.add :field_parent, :blank</p>
<p>instead of</p>
<p>errors.add :parent_issue_id, :blank</p>
<p>Regards</p> Redmine - Defect #33420: Parent wrongly translated to "subproject of"https://www.redmine.org/issues/33420?journal_id=977372020-05-09T02:14:13ZTxinto Vaz
<ul></ul><p><a class="external" href="https://github.com/cosmoBots/cosmosys_req_rm/blob/c7ca1a5b309df0985dd50d8d15249b738cdfcbb8/lib/issue_patch.rb#L32">https://github.com/cosmoBots/cosmosys_req_rm/blob/c7ca1a5b309df0985dd50d8d15249b738cdfcbb8/lib/issue_patch.rb#L32</a></p>
<p>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.</p>
<p>So, from my opinion, if there is no translation error, then the validates presence of is calling to the wrong message when validation fails.<br />I've tried to sniff the code to see when the error is raised, but my Rails knowledge is not so strong.</p> Redmine - Defect #33420: Parent wrongly translated to "subproject of"https://www.redmine.org/issues/33420?journal_id=986432020-07-27T09:40:56ZVVD VVD
<ul></ul><p>Mischa The Evil wrote:</p>
<blockquote>
<p>Y has parent, X = is a sub-project of (parent) project, X</p>
</blockquote>
<p>Typo, correct is:</p>
<blockquote>
<p>Y has parent, Y = is a sub-project of (parent) project, X</p>
</blockquote>