Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing employee from Portal from project removes the billing hours of that employee in that project invoice of current month #3424

Open
mohitsharma-22 opened this issue Feb 24, 2024 · 1 comment
Labels
module: efforttracking Items related to Effort Tracking module module : finance Items related to Finance module module : projects Items related to Projects module priority : critical !!! Need to be fixed immediately. Leave everything else and fix this!

Comments

@mohitsharma-22
Copy link
Member

mohitsharma-22 commented Feb 24, 2024

Describe the bug
When we remove an employee from a project in the portal in the middle of the month, It impacts the velocity of the project which is incorrect. Ideally, the velocity of the project should not be affected by the status of the team member.

Further, If we again add the same team member back to the project then while generating the automated invoice the hours for the team member (which was removed and then added later) are added multiple times.

To Reproduce
Steps to reproduce the behavior:

  1. Go to portal
  2. Click on any active project
  3. Remove the employee from that project.
  4. See if the total hours of the project are reduced.
  5. Now go to Finance >> Invoices >> Ready to send. notice the billable hours of the project is reduced for that employee
  6. Now go back to the project screen and add the employee again
  7. Gain go to Finance >> Invoices >> Ready to send. Noice the billable hours of the added employee is added twice.

Screenshots
Screenshot 2024-02-24 at 6 37 05 PM

Screenshot 2024-02-24 at 6 36 42 PM Screenshot 2024-02-24 at 6 37 47 PM Screenshot 2024-02-24 at 6 28 33 PM
@mohitsharma-22 mohitsharma-22 added priority : critical !!! Need to be fixed immediately. Leave everything else and fix this! module : finance Items related to Finance module labels Feb 24, 2024
@GauravGusain98
Copy link
Member

GauravGusain98 commented Feb 24, 2024

Technical details on the bug
Here the issue occurred because whenever we add a team member to the project we create a new entry for it in the project_team_member table. And when we store the effort of a team member we store the complete hours of the team member for that current project billing cycle. Since, for the first entry of a team member the hours were present and when we remove and add the team member again to the project, for the second entry as well the complete hours of the project for that team member get stored.

When calculating the billable hours for an automated invoice, we sum all the hours captured for the billing cycle for all the active or inactive team members, hence we see more hours in this case due to duplicacy of the hours for the team member which was removed and added again to the project

Fix

  1. Update the velocity logic such that it should also consider the hours billed by any inactive team member.
  2. When showing the table where we show the billable hours for the project in the project details and effort tracking page, also show the inactive team members for that project if they have any billable hours for the current project billing cycle
  3. If for the current billing cycle of the project, there are any inactive team members, Show them in the team member tab on the project edit page with all the fields for them as disabled and provide an option to mark them as active. (Note: Dont show these team members in the team member dropdown list)

@GauravGusain98 GauravGusain98 added module : projects Items related to Projects module module: efforttracking Items related to Effort Tracking module labels Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: efforttracking Items related to Effort Tracking module module : finance Items related to Finance module module : projects Items related to Projects module priority : critical !!! Need to be fixed immediately. Leave everything else and fix this!
Projects
None yet
Development

No branches or pull requests

2 participants