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:
projects
clients
people
tasks
In this setup:
- The
projects
table includes a field namedStatus
, which is a select field (e.g., “Active”, “Completed”, “On Hold”). - The
tasks
table includes a lookup field namedProject Status
. This lookup field is configured to pull the value from theStatus
field of the linked project record in theprojects
table. 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 Status
lookup field correctly reflects the currentStatus
of 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
Status
field is available there). - Change Project Status: Modify the
Status
select 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
tasks
table: Go to thetasks
table in the Softr native database. - Examine
Project Status
field: Check theProject Status
lookup field for the tasks linked to the project whose status was just changed.
Expected Behavior:
- Upon changing and saving the
Status
field in theprojects
table:- The
Project Status
lookup field in all related records within thetasks
table should automatically and immediately update to reflect the newStatus
value 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
Status
field in theprojects
table:- The
Project Status
lookup field in the linkedtasks
table retains the oldStatus
value and does not update.
- The
- To force the
Project Status
lookup field to update in thetasks
table, 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.