The default value should only be used when there is no current value in the feed.

Files: 
CommentFileSizeAuthor
0002-Default-should-only-be-used-if-no-value-exists.patch814 bytesgordon
FAILED: [[SimpleTest]]: [MySQL] 791 pass(es), 4 fail(s), and 4 exception(s).
[ View ]

Comments

mradcliffe’s picture

Solution works for me on 7.x-1.0-beta4. I guess this probably needs a test as well.

Status:Needs review» Needs work

The last submitted patch, 0002-Default-should-only-be-used-if-no-value-exists.patch, failed testing.

GaborTorok’s picture

This issue may be a duplicate of this other issue: #1447920: Default value plugin: Option to set the value only when field is empty.
The other issue also has a patch for this problem, and has an additional "Only if empty checkbox" on the settings page.

twistor’s picture

Status:Needs work» Closed (duplicate)
GuyPaddock’s picture

Issue summary:View changes
Status:Closed (duplicate)» Active

Considering that the default value plug-in is called the "Default value plug-in", and default implies that it's the fall-back value if the field is empty, I would expect that this patch is the correct approach.

The checkbox for "only if empty" is superfluous unless we're going to rename the plug-in to "Set value" or something that implies it always sets the value (but has the option to do it only if empty).

Also... the other issue doesn't yet have a usable patch, from the comment history. That issue points here for a useful patch.

twistor’s picture

Status:Active» Closed (duplicate)

Yup. We're going to have to change the name of the plugin. Changing the existing behavior is a non-starter. We can't just change the behavior for existing installs.