I’m working on a customization for a Sprint Backlog child table in ERPNext/Frappe. The goal is to make the Task field dynamic, so it only shows tasks linked to the selected backlog and automatically excludes tasks already selected in other rows for the same backlog.
Currently:
The dropdown populates via a server-side whitelisted method (get_available_tasks) that returns tasks linked to the backlog, excluding already-chosen ones.
The client script triggers when the Task field is accessed, checking that Backlog and Story Points are selected first.
It dynamically sets available options using update_docfield_property("options", r.message).
I want to enhance this further so that the
Task dropdown automatically refreshes whenever Backlog or Story Points change, ensuring users never see tasks already selected in previous rows.
Any suggestions on the best way to handle this dynamic update efficiently would be appreciated!