Bug Report: Lookup Field Not Updating in Tasks Table After Project Status Change

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 named Status, which is a select field (e.g., “Active”, “Completed”, “On Hold”).
  • The tasks table includes a lookup field named Project Status. This lookup field is configured to pull the value from the Status field of the linked project record in the projects table. This field is crucial for filtering and identifying tasks based on their associated project’s status.

Steps to Reproduce:

  1. 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 current Status of the project.
  2. 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).
  3. Change Project Status: Modify the Status select field of the selected project to a new value (e.g., change from “Active” to “Completed”).
  4. Save Changes: Ensure the changes to the project record are saved.
  5. Observe tasks table: Go to the tasks table in the Softr native database.
  6. Examine Project Status field: Check the Project 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 the projects table:
    • The Project Status lookup field in all related records within the tasks table should automatically and immediately update to reflect the new Status value from the parent project.
  • 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 the projects table:
    • The Project Status lookup field in the linked tasks table retains the old Status value and does not update.
  • To force the Project Status lookup field to update in the tasks table, it is currently necessary to:
    1. Delete the existing link between the task and the project.
    2. 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.

Hi @tglatt, thank you for the detailed description. We tested the flow, and it was working as expected. Please double-check it in your app adn let us know the results you have!