Status

()

The Bugzilla bug-tracking system.Note: This is not the place to request configuration, permission, or account changes to this installation of Bugzilla (bugzilla.mozilla.org). File such changes under the appropriate component in the bugzilla.mozilla.org product.

This is spun off from bug#64192
Because the comparison is case-insensitive when checking for existing component
and product names, if you try and change the capitalisation of a component from,
say 'test' to 'TEST', bugzilla says the component already exists.

Comment on attachment 40274[details][diff][review]
Let's try it again. (Combined Patch)
>+ if (lc($component) ne lc($componentold)) {
>+ if (TestComponent($product,$component)) {>+ if (lc($product) ne lc($productold)) {
>+ if (TestProduct($product)) {
I know it's a silly nitpick, but no use introducing more confusion, so we might as well
fix it now. :-) When you edit a product or component, and *don't* change the name, it
still claims that you updated the product name, even when you didn't. This is likely to
confuse some people. Maybe try doing something like:
if (($product ne $productold) && (lc($product) ne lc($productold))) {

We are currently trying to wrap up Bugzilla 2.16. We are now close enough to
release time that anything that wasn't already ranked at P1 isn't going to make
the cut. Thus this is being retargetted at 2.18. If you strongly disagree with
this retargetting, please comment, however, be aware that we only have about 2
weeks left to review and test anything at this point, and we intend to devote
this time to the remaining bugs that were designated as release blockers.

I had a look at this patch, and, with it attached to 2.14:
1) Dave: I couldn't get it to say it had changed the name when I hadn't done
so, so I don't think the patch needs work in that respect. (comment#9)
2) If Bugzilla is trying to be as helpful as possible, then it should probably
say 'No changes made', if none were.
3) I'm not sure that the patch is the correct way to go. I think the problem is
with the TestProduct() and TestComponent() calls. With the patch applied, and
you try and create a new product named 'TEST', when you already have a product
named 'test', you get the same problem as when changing the capitalisation.
Is it possible to change the SQL comparison to be case-sensitive? I think you
can do this by changing the data type, but I'd hope that wouldn't be necessary.

I've updated the title, because I think the same issue arises (on 2.14 anyway)
for the keywords and groups :(
I can raise new bugs for these, if that would be easier?
I also tried a different fix to the currently attached patch for the original
component/product issue. This used SQL to select all the components which
matched the new component name and then Perl to check, case-sensitively, for
matches.
This approach worked OK for adding new components whose name only differed in
capitalisation to existing component names, and for changing capitalisation,
but, of course, you then have problems selecting which component you want to edit :(
If you want Bugzilla to be able to have 2 components whose names only differ in
capitalisation, then I think that the bug for using component_ids instead of
component names needs to be fixed before this bug can be. (can't remember the
bugid for that one at the mo.)

Created attachment 150303[details][diff][review]
Allow product capitalisation changes
This just deals with products. It allows product capitalisation changes, and
also gives an error when a new product differs only in case from an existing
one

(In reply to comment #23> Nit: kill the quotes around the variables; they're really unnecessary.
Done (too much bash programming!)
>
> >+ if (lc("$existing_product") eq lc("$product")) {
>
> Same here, although I'd be ready just do this latter test; it's quite ok to say
> "The product name 'xxx' is already in use" even if there is a case-only
> difference. Humans don't consider that a difference.
I've kept the test, if that is OK -- as I'm sure there will be one day when someone tries this and
complains if we don't do this test.
> Combine the conditions using && instead of this unindented nested if.
Done