Timesheet Problem - Project No automatically inserted

Dear all,

I have this problem with Timesheet. I can reproduce every time.

  1. Create new TS.
  2. Create new entry, select project, fillout hours.
  3. save TS (this is important step)
  4. create another entry
  5. default project from row 1 is automatically prefilled
  6. change project number
  7. change activity type - project number is changed back to number from row 1.

This is a problem for us, because we use Project number as a starting point. Then based on project number script will filter project relevant tasks only. User can select Task. When task is selected, activity type is automatically entered. But here is the problem. After activity type is entered (and it doesn’t matter if automatically from script or manually), project number is changed to the one from row01. This creates a lot of user errors in timesheet.

Please help, if you know how can I fix this.

Screenshots below:

and gif from second entry:
Timesheet

A trigger for activity_type field has been intentionally added to copy project from row 1 and set it in all upcoming rows. If you don’t want it to be copied, you’ll have to remove this line of code from timesheet.js which is not recommended [changes in core file can lead to breaking up while updating].

So what if you work on multiple projects? Is it possible to change the master code in a way that this is optional?

We have a lot of projects running concurrently and this auto feature creates problems and typing mistakes.

Thank you.

You can create your own custom script that makes the project field as empty value on changing the activity_type field which overrides the current script.