Closed Bug 774531 Opened 12 years ago Closed 12 years ago

[UI] - Admin - Add Release tab fields do not properly validate data

Categories

(Socorro :: Webapp, task)

task
Not set
normal

Tracking

(Not tracked)

VERIFIED DUPLICATE of bug 772924

People

(Reporter: mbrandt, Assigned: espressive)

References

()

Details

Attachments

(1 file)

Several of the fields in the Branch Data Sources --> Add Release tab do not consistently validate data.

Steps to reproduce:
1. with an admin account log in to the admin panel on stage
2. navigate to Branch Data Sources -> Add Release
3. Add a new release with legitimate data except
4. 
    Set 'Version' to <a href="http://mozilla.org">16</a>
    Set 'Platform' to <a href="http://mozilla.org">OSX</a>
    Set 'Repository' to <a href="http://mozilla.org">16</a>

Expected:
The admin panel should give an appropriate error message

Actual:
A success message is presented in the UI that it worked, "Product Version was successfully added."
Hey Matt,

So from the UI perspective, currently those fields are simply marked as required so, as long as there is data in those fields the UI will not complain. Why the back-end did not complain about the input I am not sure and I will follow up with Adrian on that.
There is no error message simply because those values are valid. They do not correspond to any real platform or repository, but we cannot add validation here (and if we did, it would be very complicated and would make it even less usable by external users). 

For the version field, I believe the intval() function of PHP takes the first number it finds in the string and returns it, which would explain why it doesn't error out. I think your string is interpreted as a mere 16, which is a valid version number. I haven't verified that though...
(In reply to Adrian Gaudebert [:adrian] from comment #2)
> For the version field, I believe the intval() function of PHP takes the
> first number it finds in the string and returns it

Actually, AFAIK, the implicit casting of a string to the numeric value required as intval() input is what does this. Not that it makes that much difference in the result. ;-)
Thanks Schalk & Adrian - bumping to duplicate of bug 772924. There will be drastic work done the Admin UI soon.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
QA verified duplicate
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: