patch: set priorities for issue
This commit is contained in:
		
							parent
							
								
									e119a713fd
								
							
						
					
					
						commit
						e175dd8249
					
				| @ -604,3 +604,4 @@ execute:frappe.delete_doc("Report", "Inactive Items") | ||||
| erpnext.patches.v11_1.delete_scheduling_tool | ||||
| erpnext.patches.v12_0.make_custom_fields_for_bank_remittance | ||||
| execute:frappe.delete_doc_if_exists("Page", "support-analytics") | ||||
| erpnext.patches.v12_0.set_priority_for_issue | ||||
|  | ||||
							
								
								
									
										15
									
								
								erpnext/patches/v12_0/set_priority_for_issue.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								erpnext/patches/v12_0/set_priority_for_issue.py
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,15 @@ | ||||
| import frappe | ||||
| 
 | ||||
| def execute(): | ||||
| 	priorities = frappe.get_meta("Issue").get_field("priority").options.split("\n") | ||||
| 
 | ||||
| 	for priority in priorities: | ||||
| 		frappe.get_doc({ | ||||
| 			"doctype": "Issue Priority", | ||||
| 			"name":priority | ||||
| 		}).insert(ignore_permissions=True) | ||||
| 
 | ||||
| 	frappe.reload_doc("support", "doctype", "issue") | ||||
| 
 | ||||
| 	for issue in frappe.get_list("Issue", fields=["name", "priority"]): | ||||
| 		frappe.db.set_value("Issue", issue.name, "priority", issue.priority) | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user