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

VERIFIED DUPLICATE of bug 772924

Status

VERIFIED DUPLICATE of bug 772924
6 years ago
6 years ago

People

(Reporter: mbrandt, Assigned: espressive)

Tracking

unspecified

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
Created attachment 642792 [details]
qa - bug invalid form data

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."
(Assignee)

Comment 1

6 years ago
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...

Comment 3

6 years ago
(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. ;-)
(Reporter)

Comment 4

6 years ago
Thanks Schalk & Adrian - bumping to duplicate of bug 772924. There will be drastic work done the Admin UI soon.
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 772924
(Reporter)

Comment 5

6 years ago
QA verified duplicate
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.