Skip to content

[BUG] helpdesk_mgmt_timesheet: timesheet with projects without allow_timesheets #881

@DaniilDigtyar

Description

@DaniilDigtyar

Raise error trying to create a timesheet (account.analytic.line) in a helpdesk.ticket configured with a project with allow_timesheets disabled.

helpdesk_mgmt_timesheet

It can be also be affected by helpdesk_mgmt_project

Describe the bug

When creating a timesheet in a ticket with a project with allow_timesheets disabled it raises an error "At least one analytic account must be set" causing confusion to the user.
It should show a more detailed error message.

To Reproduce

  • Create a project with allow_timesheets disabled
  • Create a ticket with that project
  • On create a timesheet for that ticket, it raises the error At least one analytic account must be set

Affected versions:

  • Tried only on 18.0 OCB

Expected behavior
On create a timesheet for a project that it has allow_timesheets disabled, to show a more explicit error message like "This project doesn't allow timesheets to be registered.".

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions