Skip to content

Bug: Call Duration Field in CRM Should Be Numeric Instead of Text #1270

@Mudassir200

Description

@Mudassir200

Currently, in the CRM Call doctype, the Duration field is implemented as a Text field in the frontend. However, this field stores the call duration in seconds, which should be a numeric value to allow proper validation and calculations.

Evidence
Image

Proposed Solution:
Update the frontend component to render the Duration field as a number input:

File: frontend/src/components/FieldLayout/Field.vue

Add the following code after the Int field check:

<FormControl v-else-if="field.fieldtype === 'Duration'" 
             :name="field.fieldname + '_field'"
             :id="field.fieldname + '_field'" 
             type="number" 
             :placeholder="getPlaceholder(field)" 
             :disabled="Boolean(field.read_only)"
             v-model="data[field.fieldname]" />

This change ensures that the Duration field accepts only numeric input, matching its purpose of storing call duration in seconds.

Impact:

  • Prevents invalid text input in the Duration field.
  • Enables correct calculation and storage of call duration in seconds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions