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: Parent Task link with Project Task #37025

Merged
merged 4 commits into from
Sep 12, 2023
Merged

Conversation

s-aga-r
Copy link
Contributor

@s-aga-r s-aga-r commented Sep 11, 2023

Source / Ref: 883

Problem: When you have Tasks with Parent and Common Name in a Project Template, creating a Project against the template will not link the 2nd..nth Project Tasks with the Parent i.e., only the first Task in a group of Tasks with same name will have the Parent mapped.

  • In the below image, Task TASK-2023-00116 and TASK-2023-00120 have the same subject. When we create a Project for this template only the Task TASK-2023-00116 will be linked with the Parent Task.

    image

Solution: Currently, the Subject is used as a key to find the Template Item for a Project Task. Added a new field in Task to hold the reference of Template Task in Project Task, which will be used to find the Template Task while setting up the dependencies.

Before:

scrnli_9_11_2023_5-31-26.PM.mp4

After:

scrnli_9_11_2023_5-35-28.PM.mp4

@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label Sep 11, 2023
@s-aga-r s-aga-r added the backport version-14-hotfix backport to version 14 label Sep 11, 2023
@codecov
Copy link

codecov bot commented Sep 11, 2023

Codecov Report

Merging #37025 (0d5c8f0) into develop (175870c) will increase coverage by 0.19%.
Report is 24 commits behind head on develop.
The diff coverage is 68.57%.

@@             Coverage Diff             @@
##           develop   #37025      +/-   ##
===========================================
+ Coverage    65.74%   65.93%   +0.19%     
===========================================
  Files          796      796              
  Lines        62730    62756      +26     
===========================================
+ Hits         41244    41381     +137     
+ Misses       21486    21375     -111     
Files Changed Coverage
.../report/accounts_receivable/accounts_receivable.py 50.00%
erpnext/projects/doctype/project/project.py 66.66%
...rpnext/stock/report/stock_balance/stock_balance.py 66.66%
...ounts/doctype/purchase_invoice/purchase_invoice.py 69.56%
...stock/doctype/material_request/material_request.py 100.00%

@s-aga-r s-aga-r removed the needs-tests This PR needs automated unit-tests. label Sep 11, 2023
@s-aga-r s-aga-r marked this pull request as ready for review September 11, 2023 12:55
@s-aga-r s-aga-r changed the title fix: Parent Task linking in Project Task fix: Parent Task link with Project Task Sep 11, 2023
@s-aga-r s-aga-r marked this pull request as draft September 11, 2023 13:21
@s-aga-r s-aga-r marked this pull request as ready for review September 12, 2023 01:28
@s-aga-r s-aga-r merged commit 3c6e527 into frappe:develop Sep 12, 2023
11 of 12 checks passed
s-aga-r added a commit that referenced this pull request Sep 12, 2023
* feat: new field in `Task` to hold ref of Template Task

(cherry picked from commit b4bcd9b)

# Conflicts:
#	erpnext/projects/doctype/task/task.json

* fix: set `Template Task` ref in `Project Task`

(cherry picked from commit d3295c4)

* fix: reload task before save

(cherry picked from commit 5cae2e7)

* test: add test case for Task having common subject

(cherry picked from commit 0d5c8f0)

* chore: `conflicts`

---------

Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
frappe-pr-bot pushed a commit that referenced this pull request Sep 12, 2023
# [14.39.0](v14.38.0...v14.39.0) (2023-09-12)

### Bug Fixes

* `company` is ambiguous ([fe69d53](fe69d53))
* `Parent Task` link with `Project Task` (backport [#37025](#37025)) ([#37033](#37033)) ([6602787](6602787))
* correct asset daily depr schedule calculation [v14] ([#36991](#36991)) ([2ae4463](2ae4463))
* generate pdf only when result exists ([53270dd](53270dd))
* remove report field db set ([284181d](284181d))
* show letterhead and terms for AR pdf ([2077b2c](2077b2c))
* Update party type for payroll payable account ([f251d6c](f251d6c))
* use primary key for link lookup (backport [#36919](#36919)) ([#36978](#36978)) ([4fede56](4fede56))
* **ux:** docstatus filter for `Reference Name` in QI (backport [#37024](#37024)) ([#37028](#37028)) ([21be889](21be889))

### Features

* add field for specifying pdf name ([657ca7f](657ca7f))
* Add half-yearly asset maintenance periodicity. (backport [#37006](#37006)) ([#37014](#37014)) ([acd9c69](acd9c69))
* provision to set required by from Production Plan ([#37039](#37039)) ([d278b11](d278b11))
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport version-14-hotfix backport to version 14
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants