Skip to content

Rows created from a filtered view disappear when the filter targets a hidden column #2992

Description

@Aveyron-RetD

Is your feature request related to a problem? Please describe.

When a view has a filter with an "is equal" condition on a column that is hidden in that view, creating a new row from within that view does not pre-fill the hidden column with the filter's value. As a result, the newly created row doesn't match the filter condition and immediately disappears from the view, even though the user just created it from there.

Example:

View "Open tickets" filters on Status = Open, but the Status column is hidden in this view.
User clicks "Create row" from the "Open tickets" view.
The new row is created with Status empty (or a different default), so it doesn't satisfy Status = Open.
The row vanishes from the view immediately after creation, which is confusing since the user has no visual feedback about why.

Describe the solution you'd like

When a row is created from a view that has one or more "equals" filters on hidden (or even visible) columns, the value(s) used in those filters should be applied as default value(s) for the corresponding column(s) on the new row. This way, a row created from a filtered view actually satisfies the filter and remains visible, matching user expectation ("I created this row here, it should stay here").

Scope suggestion: this should probably apply specifically to is-equal-type conditions (and similar unambiguous single-value operators), since it's not possible to auto-derive a sensible default for ranges, "contains", "is-empty", etc.

Describe alternatives you've considered

Showing a warning/toast when creating a row from a view that has a filter on a hidden column, explaining that the row may not appear unless required fields are set.
Making it clear in the row creation form that the row might not respect the current view filters, so the user manually sets the value.

Both alternatives are "explain the confusing behavior" rather than "fix the confusing behavior," so the auto-default approach is preferable if feasible.

Additional context

This ties into hidden-column behavior more broadly — since the column isn't shown, there's no way for the user to even notice or set the value manually at creation time. Auto-populating from the active filter seems like the least surprising fix.

Activity

  1. added
    enhancementNew feature or request
    0. Needs triagePending approval or rejection. This issue is pending approval.
    on Sep 11, 2026
  2. Aveyron-RetD commented on Sep 11, 2026

    @Aveyron-RetD
    Author

    Mm this seems to be missing that some views should not allow to create a row because they depend on another view

  3. Aveyron-RetD commented on Sep 11, 2026

    @Aveyron-RetD
    Author

    Ok so this is a bug because it is supposed to work (in row service)

     * When inserting rows into views we try to prefill columns that are not
    	 * accessible by reasonable defaults
    	 *
    	 * This might not work in all cases, but for single filter rules this is
    	 * the sanest to ensure the row is actually part of the view
    	 */
    	private function enhanceWithViewDefaults(?View $view, RowDataInput $data): RowDataInput {
    		if ($view === null) {
    			return $data;
    		}
    
    		$filters = $view->getFilterArray();
    		if (empty($filters)) {
    			return $data;
    		}
    
    		// Process each filter rule group (AND groups)
    		foreach ($filters as $filterRules) {
    			if (!is_array($filterRules)) {
    				continue;
    			}
    
    			// Process each filter within the group (OR conditions)
    			foreach ($filterRules as $filter) {
    				if (!is_array($filter) || !isset($filter['columnId'], $filter['operator'], $filter['value'])) {
    					continue;
    				}
    
    				// Skip if the column is already visible in the view
    				if (in_array($filter['columnId'], $view->getColumnIds())) {
    					continue;
    				}
    
    				// For meta columns, we don't need to add them to the data since they are handled separately
    				if (Column::isValidMetaTypeId($filter['columnId'])) {
    					continue;
    				}
    
    				// Only handle simple equality filters for now
    				if (!in_array($filter['operator'], ['is-equal', 'is-not-equal'])) {
    					continue;
    				}
    
    				// Only set the default if the column hasn't been set yet
    				if (!$data->hasColumn($filter['columnId'])) {
    					$data->add($filter['columnId'], $this->columnsHelper->resolveSearchValue((string)$filter['value'], $this->userId));
    				}
    			}
    		}
    		return $data;
    	}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagePending approval or rejection. This issue is pending approval.enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions