Recreation of the issues:
1) create a user type view
2) set a relationship with the user submissions (don't make the relationship compulsory)
3) add a 'draft' column to your view
4) if you have users withno submissions, there you go: the draft column will read: 'completed'

Fix:
open the file modules/webform/views/webform_handler_field_is_draft.inc, and add as follows:
class webform_handler_field_is_draft extends views_handler_field {
function render($values) {
$is_draft = $values->{$this->field_alias};
if($is_draft == null) return (t('no data')); // <<<--- this is the fix
return $is_draft ? t('draft') : t('completed');
}
}

Sorry I have no git installation yet to provide a proper patch. Also I see now that HEAD has modified this code...
Hope it helps someone.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DanChadwick’s picture

Version: 7.x-4.0-alpha8 » 7.x-4.0-rc6
Issue summary: View changes
Status: Needs work » Fixed
FileSize
978 bytes

Thanks. I made it say "no submission" when NULL.

  • DanChadwick committed 6c374f6 on
    Issue #2025833 by oscardax: Fixed is_draft in Views will default to '...
  • DanChadwick committed e0708a6 on
    Issue #2025833 by oscardax: Fixed is_draft in Views will default to '...

Status: Fixed » Closed (fixed)

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