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

fix(Timesheets): calculate to time #28589

Merged
merged 15 commits into from
Jan 21, 2022

Conversation

hrwX
Copy link
Contributor

@hrwX hrwX commented Nov 27, 2021

  • When time logs are being entered in timesheets, when you enter the from time and hours, the to time will be calculated.
  • But this functionality is missing if you create timesheets using an API.
  • This PR fixes that by checking if to time is empty and calculates it based off from time and hours.

@ankush ankush added squash Meant to tell reviewers that this PR should be squashed into a single commit while merging. backport version-13-hotfix labels Nov 27, 2021
@codecov
Copy link

codecov bot commented Nov 27, 2021

Codecov Report

Merging #28589 (b346731) into develop (cce35c1) will increase coverage by 0.03%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop   #28589      +/-   ##
===========================================
+ Coverage    57.91%   57.95%   +0.03%     
===========================================
  Files         1091     1091              
  Lines        67866    67873       +7     
===========================================
+ Hits         39305    39334      +29     
+ Misses       28561    28539      -22     
Impacted Files Coverage Δ
erpnext/projects/doctype/timesheet/timesheet.py 79.29% <100.00%> (+0.58%) ⬆️
...ext/accounts/report/balance_sheet/balance_sheet.py 36.36% <0.00%> (-21.82%) ⬇️
...payroll/doctype/income_tax_slab/income_tax_slab.py 83.33% <0.00%> (-16.67%) ⬇️
...ctype/woocommerce_settings/woocommerce_settings.py 80.76% <0.00%> (-3.85%) ⬇️
erpnext/assets/doctype/asset/depreciation.py 85.23% <0.00%> (-2.69%) ⬇️
erpnext/stock/reorder_item.py 75.21% <0.00%> (-2.57%) ⬇️
...unts/report/purchase_register/purchase_register.py 71.23% <0.00%> (-2.06%) ⬇️
...t/accounts/report/general_ledger/general_ledger.py 59.59% <0.00%> (-1.69%) ⬇️
...cial_statement/consolidated_financial_statement.py 88.81% <0.00%> (-1.60%) ⬇️
erpnext/crm/doctype/prospect/prospect.py 55.22% <0.00%> (-1.50%) ⬇️
... and 19 more

@stale stale bot added the inactive label Dec 12, 2021
@stale stale bot closed this Dec 15, 2021
@barredterra barredterra reopened this Dec 17, 2021
@stale stale bot removed the inactive label Dec 17, 2021
@frappe frappe deleted a comment from stale bot Dec 17, 2021
@barredterra barredterra assigned hrwX and unassigned hrwX Dec 17, 2021
@stale stale bot added the inactive label Jan 1, 2022
@frappe frappe deleted a comment from stale bot Jan 1, 2022
@stale stale bot removed the inactive label Jan 1, 2022
@barredterra barredterra self-assigned this Jan 1, 2022
@barredterra barredterra added the needs-tests This PR needs automated unit-tests. label Jan 3, 2022
Copy link
Collaborator

@barredterra barredterra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hrwX kindly add a test to cover this change.

@barredterra barredterra removed needs-tests This PR needs automated unit-tests. backport version-13-hotfix labels Jan 14, 2022
@barredterra
Copy link
Collaborator

@Mergifyio backport version-13-hotfix

@mergify
Copy link
Contributor

mergify bot commented Jan 14, 2022

backport version-13-hotfix

🟠 Waiting for conditions to match

  • merged [:pushpin: backport requirement]

@barredterra
Copy link
Collaborator

@ankush can we get this merged?

@ruchamahabal ruchamahabal merged commit f5ed0c8 into frappe:develop Jan 21, 2022
mergify bot pushed a commit that referenced this pull request Jan 21, 2022
Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
Co-authored-by: barredterra <14891507+barredterra@users.noreply.github.com>
(cherry picked from commit f5ed0c8)
@mergify
Copy link
Contributor

mergify bot commented Jan 21, 2022

backport version-13-hotfix

✅ Backports have been created

ruchamahabal pushed a commit that referenced this pull request Jan 21, 2022
Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
Co-authored-by: barredterra <14891507+barredterra@users.noreply.github.com>
Co-authored-by: Himanshu <himanshuwarekar@yahoo.com>
KrithiRamani pushed a commit to KrithiRamani/erpnext that referenced this pull request Mar 14, 2022
)

Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
Co-authored-by: barredterra <14891507+barredterra@users.noreply.github.com>
Co-authored-by: Himanshu <himanshuwarekar@yahoo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
squash Meant to tell reviewers that this PR should be squashed into a single commit while merging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants