Closed
Bug 950913
Opened 11 years ago
Closed 10 years ago
TRUNCATE_LENGTH
Categories
(Input Graveyard :: Code Quality, defect)
Input Graveyard
Code Quality
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: willkg, Assigned: aokoye)
Details
(Whiteboard: u=dev c=codequality p= s=input.2014q4)
We define a TRUNCATE_LENGTH in fjord/feedback/models.py. We have the same number in a few other places. We should move that somewhere that is accessible to all the places using it and document it.
Reporter | ||
Updated•10 years ago
|
Whiteboard: u=dev c=codequality p= s=input.adam
Reporter | ||
Comment 1•10 years ago
|
||
The number "10000" shows up in a couple of different contexts, but the only one we're concerned with here is TRUNCATE_LENGTH. Doing a grep across the code removing irrelevant hits yields this: <fjord> (M=f8dd1 fjord/) saturn2 ~/mozilla/fjord/fjord> grin 10000 ./feedback/models.py: 39 : TRUNCATE_LENGTH = 10000 ./feedback/templates/feedback/fxos_feedback.html: 109 : <textarea data-max-length="10000" id="description" name="description" cols="40" rows="4"></textarea> ./feedback/templates/feedback/generic_feedback_form.html: 56 : <textarea data-max-length="10000" id="description" name="description" cols="40" rows="4"></textarea> ./feedback/templates/feedback/generic_feedback_form_dev.html: 99 : <div id="description-counter">10000</div> 100 : <textarea data-max-length="10000" id="description" name="description"></textarea> ./feedback/tests/test_models.py: 27 : eq_(resp.description, 'a' * 10000) The generic_feedback_form.html and generic_feedback_form_dev.html templates are getting merged soon. That'll end up being one place. The rest of these should pull from a configuration "constant".
Reporter | ||
Updated•10 years ago
|
Assignee: nobody → aokoye
Reporter | ||
Comment 2•10 years ago
|
||
In a PR: https://github.com/mozilla/fjord/pull/407 Landed in master: https://github.com/mozilla/fjord/commit/c2e7fd355e33a3dd96f3bc65d35fcda2280baa00 https://github.com/mozilla/fjord/commit/c81da0b585ab4de503681ab85d24149a730a18de I'll push this on Monday.
Status: NEW → ASSIGNED
Reporter | ||
Comment 3•10 years ago
|
||
Pushed this to prod just now. Thank you!
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 4•9 years ago
|
||
Moving things out of the input.adam sprint.
Whiteboard: u=dev c=codequality p= s=input.adam → u=dev c=codequality p= s=input.2014q4
Updated•7 years ago
|
Product: Input → Input Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•