def get_field(field, default = nil)
      value = fields[field]
      value = default if !default.nil? && (value.nil? || (value.respond_to?(:empty?) && value.empty?))
      value
    end
def get_field(field, default = nil)
      value = fields[field]
      value = default if !default.nil? && (value.nil? || (value.respond_to?(:empty?) && value.empty?))
      value
    end
end persistence
 Get a field from workitem, supporting default value