Changing a code's default value changes the default value for all codes to that default.

To reproduce:
1. Create two codes, say code1 and code2.
2. Add a single option "x" to code1 and make it the default (default_single).
3. Add a single option "y" to code2 and make it the default (default_single).
4. Go back to the code1 options.

Expected result: "x" is still the default value for code1.
Actual result: code1 has no default value.

Behind the scenes: code1 default value has also been changed in the database to "y".

A patch is attached.

CommentFileSizeAuthor
#1 codes_default_fix.patch545 bytesMark Rose
codes_default_fix.patch537 bytesMark Rose

Comments

Mark Rose’s picture

StatusFileSize
new545 bytes

Sorry--original patch was bad. New patch attached.

pasqualle’s picture

Status: Active » Reviewed & tested by the community

wow, thanks
will commit soon

pasqualle’s picture

Assigned: Unassigned » pasqualle
pasqualle’s picture

Status: Reviewed & tested by the community » Fixed

http://drupal.org/cvs?commit=166917

please note that I started to fully rewrite the module again, which should result in a much more cleaner functionality. The default value does not seems to be usable enough, so this column will be removed.. I hope I can commit the new version in the near future.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.