1
0
Fork 0
liza/test
Mike Gerwitz ecdfea5cdb ProgramInit: Do not initialize bucket values for undefined question types
These denote fields that are generated but do not actually have any data
associated with them.  For example, select options with predicates have a
field generated so that they contribute to the group field count (so that
the group will automatically show/hide appropriately), but those should
never have values associated with them in the bucket.

This was manifesting as a nasty bug:  The bucket contained a key for
generated options.  When the quote is loaded, the client "empties" the
bucket.  In doing so, it set the option value to the empty string, which had
the effect of rendering the dropdown useless---every value was the empty
string!

* src/program/ProgramInit.js (_isKnownType): New method.
  (init): Use it and ignore fields with unknown types.
* src/server/Server.js: Add note that we shouldn't have this logic
  duplicated between ProgramInit and ProgramQuoteCleaner.
* src/server/quote/ProgramQuoteCleaner.js (_fixGroup): Ignore fields with
    unknown types.
  (_isKnownType): New method.
* test/program/ProgramInitTest.js: Update existing tests.  Add new.
* test/server/quote/ProgramQuoteCleanerTest.js: Test this case.
2018-11-14 11:52:52 -05:00
..
bucket [DEV-3257] DelayedStagingBucket: Preempt infinite recursion on #processValues 2018-08-10 11:17:13 -04:00
client [DEV-3393] Made sure the entity id is a number 2018-08-16 07:35:52 -04:00
conf Add ConfLoader 2017-08-28 09:07:28 -04:00
dapi Add HttpDataApiUrlData 2018-05-01 09:44:53 -04:00
document [DEV-2871] DocumentProgramFormatter: Match on fields from FieldClassMatcher instead of __classes and program.whens 2018-06-13 15:42:45 -04:00
event ValueSetEventHandler: New handler for `set' event 2018-02-07 14:59:50 -05:00
field FieldClassMatcher: Minor refactoring/cleanup 2018-06-12 16:52:14 -04:00
program ProgramInit: Do not initialize bucket values for undefined question types 2018-11-14 11:52:52 -05:00
quote [DEV-3393] Made sure the entity id is a number 2018-08-16 07:35:52 -04:00
server ProgramInit: Do not initialize bucket values for undefined question types 2018-11-14 11:52:52 -05:00
store Add DelimitedKey Store trait 2017-08-29 14:34:40 -04:00
system LoVullo Associates => R-T Specialty 2017-06-08 14:48:43 -04:00
ui GeneralStepUiTest: Fix failing test case in newer version of Node 2018-03-07 14:12:48 -05:00
validate LoVullo Associates => R-T Specialty 2017-06-08 14:48:43 -04:00
pre.js LoVullo Associates => R-T Specialty 2017-06-08 14:48:43 -04:00