Allow a user to trigger an new VG Wort counter ID for an entity

Created on 9 May 2023, over 1 year ago
Updated 28 February 2024, 7 months ago

Problem/Motivation

VG Wort does not allow authors to change for an existing counter ID where the author information has been sent to VG Wort. In Drupal we do not have a such a restriction. It's possible that a long standing page might be re-authored several times. The only solution is to generate a new counter ID for the entity so we can attach new author information to the content.

Proposed resolution

Add a new base field to entities that have the vgwort counter. The field should be called vgwort_counter_suffix. The default value should be null. It should be an positive integer with starting from 1. If it is set it should be added as a suffix to the counter ID in \Drupal\vgwort\Plugin\Field\CounterIdFieldItemList::computeValue(). There should be a delimiter between the rest of the counter ID and this value - perhaps a hyphen or an underscore.

Add a local task to entities that are using the VG Wort counter ID. On this page have a button that allows a user to trigger a new VG Wort counter ID. This should have a confirm form. We can use the previous revision sent to VG Wort to inform the user about probable changes so they can determine if this is a good idea. The button should be disabled if the entity has not yet been sent to VG Wort. We also should give the user some idea of the current process state - ie. whether it is in the queue and if and when it has been successfully submitted. Further developments could see this local task being able to retrieve counts from the API so that editors have more information about what is going on.

Remaining tasks

User interface changes

@tbd

API changes

@tbd

Data model changes

@tbd

πŸ“Œ Task
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

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

Comments & Activities

Production build 0.71.5 2024