Problem/Motivation

After creating a new subqueue it is possible to then change the display 'Name' (whilst retaining the machine name). See screenshot Screenshot
This is useful when using a programatic naming convention whilst allowing customer facing queues to use 'Friendly names'.
However this falls down when the 'Edit subqueue' page uses the machine name in the title (Not the 'Friendly Name'). See screenshot Screenshot.

Proposed resolution

Allow 'Name' to be used by the 'Edit subqueue' page.

Comments

racinggrinner created an issue. See original summary.

danielveza’s picture

StatusFileSize
new745 bytes

Attaching a patch that fixes this.

I think the desired behaviour should be that the display is "Edit subqueue {Parent queue title}", so thats what my patch does.

Open for other suggestions!

dieuwe’s picture

Status: Active » Reviewed & tested by the community

Applies and works nicely, good UI improvement.

amateescu’s picture

Title: Display the 'Name' not machine name on 'Edit subqueue' page/s » Subqueue labels are not kept in sync with their queue label for simple queues
Component: User interface » Code
Category: Feature request » Bug report
Status: Reviewed & tested by the community » Needs review
StatusFileSize
new553 bytes

This patch only works when you are dealing with simple queues, which means that every queue will only have a single subqueue. But when you create a queue with multiple subqueues, each subqueue will have a different name, so we can not display the queue name when editing a subqueue because that will be terribly confusing.

However this falls down when the 'Edit subqueue' page uses the machine name in the title (Not the 'Friendly Name').

That's not really accurate, we display the subqueue label, not the subqueue machine name.

I think the proper way to fix this is to handle the possible inconsistent labels in \Drupal\entityqueue\Plugin\EntityQueueHandler\Simple::onQueuePostSave().

Can you try this patch and let me know if it works for you?

sagesolutions’s picture

StatusFileSize
new911 bytes

I agree, \Drupal\entityqueue\Plugin\EntityQueueHandler\Simple::onQueuePostSave() is the best way to update this. see attached patch.

amateescu’s picture

Status: Needs review » Fixed

I like the patch in #5, it's more clear if we go with the non-negated condition first.

Committed to 8.x-1.x. Thanks!

Status: Fixed » Closed (fixed)

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