Formatter setting availability_status doesn't work

Created on 26 August 2024, 8 months ago
Updated 20 September 2024, 7 months ago

Problem/Motivation

Formatter setting availability_status doesn't work

Despite the setting, the output is always shown!

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code (commerce_product_availability)

Created by

🇩🇪Germany Anybody Porta Westfalica

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @Anybody
  • Assigned to Grevil
  • Status changed to Needs review 8 months ago
  • 🇩🇪Germany Anybody Porta Westfalica

    @Grevil: Works now. I'd like to keep the machine name passed.

    Still we have another issue:
    Even if there's no output, the field is treated as not empty, so the label is shown. The reason is that all conditions in the template are false, but the isEmpty() check of the field formatter is still true, as there's an availability status set.

    I'm unsure if we should fix that separately and if there's a case to configure it like this at all...

    Maybe dedicated follow-up?

  • Merge request !18Fix show_availability_status setting → (Merged) created by Anybody
  • First commit to issue fork.
  • Status changed to RTBC 8 months ago
  • 🇩🇪Germany Grevil

    @anybody, agreed this isn't easily done, because the "isEmpty()" would theoretically need to know the currently set formatter settings (to see which property is enabled) to 100% ensure the isEmpty logic, but having a field type method depend on a formatter setting doesn't sound like a good idea! 😛

    But yea I'll create a follow up issue for this.

    LGTM!

  • Status changed to Fixed 8 months ago
  • 🇩🇪Germany Anybody Porta Westfalica
  • 🇩🇪Germany Anybody Porta Westfalica
  • Issue was unassigned.
  • 🇩🇪Germany Grevil

    Created the "follow-up" issue here: 🐛 Field Type "isEmpty()" method logic does not sync with template logic Active . Wouldn't even declare this as a follow-up issue.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024