Bug Report: Lookup Field Not Updating in Tasks Table After Project Status Change
Product: Softr - Native Database (new) with Custom Front-End Application
Application Type: Project Management System
Issue Description:
Lookup fields in child tables are not automatically updating when the corresponding source field in the linked parent record is modified. Specifically, when the Status field in the projects table is changed, the Project Status lookup field in the tasks table, which is designed to pull this information, retains the old value. The only way to force an update is to manually delete and re-establish the linked record between the task and the project.
Work Context:
The application is a project management system built on Softr’s new native database. It utilizes the following tables:
projectsclientspeopletasks
In this setup:
- The
projectstable includes a field namedStatus, which is a select field (e.g., “Active”, “Completed”, “On Hold”). - The
taskstable includes a lookup field namedProject Status. This lookup field is configured to pull the value from theStatusfield of the linked project record in theprojectstable. This field is crucial for filtering and identifying tasks based on their associated project’s status.
Steps to Reproduce:
- Identify a Project and Linked Tasks: Select an existing project in the front-end application that has associated tasks. Ensure these tasks are linked to this project and their
Project Statuslookup field correctly reflects the currentStatusof the project. - Access Project Record: Navigate to the project record in the Softr native database (or via the front-end if direct editing of the
Statusfield is available there). - Change Project Status: Modify the
Statusselect field of the selected project to a new value (e.g., change from “Active” to “Completed”). - Save Changes: Ensure the changes to the project record are saved.
- Observe
taskstable: Go to thetaskstable in the Softr native database. - Examine
Project Statusfield: Check theProject Statuslookup field for the tasks linked to the project whose status was just changed.
Expected Behavior:
- Upon changing and saving the
Statusfield in theprojectstable:- The
Project Statuslookup field in all related records within thetaskstable should automatically and immediately update to reflect the newStatusvalue from the parent project.
- The
- This automatic update should ensure that tasks remain correctly categorized and filterable based on the current project status without manual intervention.
Actual Behavior:
- After changing and saving the
Statusfield in theprojectstable:- The
Project Statuslookup field in the linkedtaskstable retains the oldStatusvalue and does not update.
- The
- To force the
Project Statuslookup field to update in thetaskstable, it is currently necessary to:- Delete the existing link between the task and the project.
- Re-establish the link by re-attaching the task to the project. This manual process is cumbersome and inefficient.
Impact:
This bug significantly impairs data accuracy and workflow efficiency. Users cannot rely on lookup fields to reflect real-time data from linked records, leading to:
- Incorrect filtering and reporting of tasks based on project status.
- Increased manual effort to maintain data consistency.
- Potential for outdated information to be used in decision-making, impacting project management effectiveness.