Page MenuHomePhabricator

Value field behavior when selecting conflicting property
Closed, ResolvedPublic

Description

As a query builder I want to know in advance if my query will fail in order to correct it in advance

Problem:
Currently, when selecting a property with datatype A, typing a matching value, then selecting a property with datatype B, i am not informed that the formerly input value will not work anymore. When running the query, i don't get an error but simply get 0 results instead of letting users know that the query input was invalid.

Example:
If I select the property postal code (which only takes strings as a value) and type 12345 into the value field, then go back to the property component and select the property instance of (which only takes items) but i still have that string in my value field, and then run the query, I get shown 0 results.

What we want instead is for the value field to clear whatever was in there when the datatype of the value doesn't match the selected property anymore.

mockups

image.png (487×1 px, 52 KB)

BDD
GIVEN a filled property field of datatype A
AND a filled value field of datatype A
WHEN selecting a property of a different datatype
THEN remove the input from the value field

Acceptance criteria:

  • Clear the value input when the property datatype doesn't match the value input datatype anymore

Open questions:

  • Should we have a default Property selected when opening the query builder like "instance of"?
    • What happens in the next rows?
  • If we don't have a default Property what happens to the value if its put in before the Property is selected?

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Charlie_WMDE renamed this task from Property/value interaction to Value field behavior when selecting conflicting property.Nov 30 2020, 9:41 AM
Charlie_WMDE updated the task description. (Show Details)
Charlie_WMDE added a subscriber: Bugreporter.