because the project name would be hardcoded, the project name can be changed regularly. if i want this updated immediately i have to write a server script or go into the task remove and re-add them into the task and save the task to have the updated project name.
In the list in my first post, the name and id are the same , the project was provided in the installation as an example. Upon creating a new project and task , the problem you have described is confirmed. After clicking on the id and changing the id to match the name, the task list shows the new id, although that may not be what you’re looking for.
ok, so it looks thats the default case. does anyone have a simple idea how to solve (without save them hardcoded - because of the problems described above)?
Name is not the same field that project_name. The term “Name” is a bit confusing. Every doctype have his own “Name” field, that represents the id of the row in the database. This name is defined by a naming strategy on each doctype.
About your main requirement … Probably the easier way is adding a custom field on your doctype, fetching the project_name and storing it on task doctype.
Maybe you could workaround customizing listview with formatters, on a simple client script. This technique allows to process the data showed in listview:
Maybe you can use frappe.db.get_value to return the project name from project doctype, but i’ve not tried this. Seems not a good way, because this will trigger one call for each row on listview …
Made the above customization by following these steps, Team can validate and suggest me if any impact because of these changes:
opened the site_config.json, find this file in frappe-bench/sites/nameofthesite
add “developer_mode”: 1 to make the site to developer mode
through awesome bar, goto “DocType List”
open Project
Goto settings
In settings goto “Vie Settings”
select the check boxes: “Show Title in Link Fields” and “Translate Link Fields” and save
with the above, Task will have Project Name instead of Project ID