Closed Bug 1105585 Opened 10 years ago Closed 10 years ago

Fix bug bounty form to validate its input more and relax the restriction on the paid field to include -+? suffix

Categories

(bugzilla.mozilla.org :: Extensions, defect)

Production
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dylan, Assigned: dylan)

References

Details

Attachments

(1 file, 1 obsolete file)

+++ This bug was initially created as a clone of Bug #1103837 +++

Currently, the bug county form allows the paid field to include any characters, but the parser that populates the "edit" form does not support anything other than numbers. It turns out the use-case of the paid field requires a -/+/? after the paid field. (This was originally going to be a separate field, as I recall.)
For a simple fix, we'll fix the parser to match the user expectation, although really it would've made more sense to record the +/? state in the form encounter from the start.
Assignee: nobody → dylan
Attached patch bug-1105585-v1.patch (obsolete) — Splinter Review
Improve form validation, and at the same time add an optional suffix to the paid field.
Attachment #8529490 - Flags: review?(glob)
Oops. This one is without console.log statements.
Attachment #8529490 - Attachment is obsolete: true
Attachment #8529490 - Flags: review?(glob)
Attachment #8529491 - Flags: review?(glob)
Comment on attachment 8529491 [details] [diff] [review]
bug-1105585-v1.1.patch

Review of attachment 8529491 [details] [diff] [review]:
-----------------------------------------------------------------

the 'amount paid' field is optional, however if left blank an "invalid value" error is displayed.
r=glob with this fixed on commit

::: extensions/BMO/Extension.pm
@@ +279,3 @@
>          (?<reported_date>  $date)   ?  \s*,\s*
>          (?<fixed_date>     $date)   ?  \s*,\s*
>          (?<awarded_date>   $date)   ?  \s*,\s*

nit: realign things, it looked so pretty before
Attachment #8529491 - Flags: review?(glob) → review+
hello,

what is the status of this?

thanks!
sorry this was missed; i've committed the patch however it won't be active on bmo until the next production push (currently scheduled for this week).

To ssh://gitolite3@git.mozilla.org/webtools/bmo/bugzilla.git
   0cd42fd..9addfeb  master -> master
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
this is now live on production.
Component: Extensions: BMO → Extensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: