in testing hunmonk's very cool patch in http://drupal.org/node/86806 to reset the component and version when you switch projects, i noticed a bug when submitting new issues. turns out, this bug is totally unrelated to his patch, and exists in 4.7.x-*, too. basically, if you use a URL like:
node/add/project_issue/foo
but change the value of project from "foo" to "bar", if either project has releases and versions, the validation step always fails, no matter what you do. this needs to be fixed regardless of what happens with #86806. i think it'll be pretty easy to solve once i start digging into it.
Comments
Comment #1
dwwactually, the main problem is in the form builder, not in the validation, though both need fixing. it's not just the version, but also the component and any other potentially project-specific fields that get nailed by this bug. this patch seems to solve it. needs more review/testing.
Comment #2
dwwhere's a version for HEAD, e.g. if you want to try it out with http://drupal.org/node/57120
Comment #3
hunmonk commentedtested with http://drupal.org/node/57120 also installed. created new issues and followups, changing projects on the fly w/ both. everything looks fine.
i'm not all that excited about the goofy if/else logic, but that's not really what we're fixing here. :)
+1 in that it fixes the issue -- we can clean up the overall code structure later...
Comment #4
dwwcommitted a slightly modified version (takes out the
'#default_value' => 0from my previous patch) to HEAD, DRUPAL-4-7--2 and DRUPAL-4-7.Comment #5
(not verified) commented