This repository has been archived by the owner on Mar 28, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a5a4b67
commit bcb596c
Showing
3 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
it_management.patches.0_1.task_checklist | ||
it_management.patches.0_1.configuration_item_table |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import frappe | ||
|
||
""" | ||
Column `linked_configuration_item` in `Configuration Item Table` has been renamed to `configuration_item` | ||
UPDATE `tabConfiguration Item Table` | ||
SET configuration_item = linked_configuration_item | ||
WHERE linked_configuration_item is not NULL and configuration_item is NULL | ||
""" | ||
|
||
filters={'linked_configuration_item':("!=", ""), 'configuration_item':("=", "")} | ||
cit_list = frappe.get_list("Configuration Item Table", filters=filters) | ||
|
||
for name in cit_list: | ||
tl = frappe.get_doc("Configuration Item Table", name) | ||
tl.configuration_item = tl.linked_configuration_item | ||
tl.save() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import frappe | ||
|
||
""" | ||
`checklist_table` in `Task` has been renamed to `task_checklist` | ||
""" | ||
|
||
tc_list = frappe.get_list("Task Checklist", filters={'parentfield':'checklist_table'}) | ||
|
||
for name in tc_list: | ||
tl = frappe.get_doc("Task Checklist", name) | ||
tl.parentfield = 'task_checklist' | ||
tl.save() | ||
|