I needed a formatter that displayed the current state name as plain text (for use with a views generated overview table). This is a pretty basic formatter, but it seems it could be useful.

CommentFileSizeAuthor
current-state-field-formatter.patch1.48 KBbrooksbrown

Comments

brooksbrown created an issue. See original summary.

johnv’s picture

Status: Active » Postponed (maintainer needs more info)

I don't understand. How is your solution different from the provided formatter. That is a normal textfield output formatter.

brooksbrown’s picture

This formatter would be an option for display in addition to the transition form. I may be missing something but in the current state, only the transition form is available.

johnv’s picture

Status: Postponed (maintainer needs more info) » Needs review

Indeed, this feature is lost in the process of porting to D8.

In D7, we just added a reference to the 'textfield' formatter.

function workflowfield_field_formatter_info_alter(&$info) {
  $info['list_default']['field types'][] = 'workflow';
}

Shouldn't this be sufficient for D8, too?

johnv’s picture

Title: Basic current state field formatter » Restore Basic current state field formatter/widget

This is because a hook was not declared properly.

  • johnv committed 3169bc2 on 8.x-1.x
    Issue #2851826 by brooksbrown: Restore Basic current state field...
johnv’s picture

Version: 8.x-1.x-dev » 8.x-1.0-beta6
Category: Feature request » Bug report
Status: Needs review » Fixed

Please see above commit. It fixes the hooks for Widget and Formatter.

Status: Fixed » Closed (fixed)

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

johnv’s picture

Status: Closed (fixed) » Active

It seems there is a regression error here.

  • johnv committed d4e088d on 8.x-1.x
    Issue #2851826 by brooksbrown: Restore Basic current state field...
johnv’s picture

Status: Active » Fixed

This was corrupted due to [##2872208] . Luckily, there was no new release between commits #6 and #10.

Status: Fixed » Closed (fixed)

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