Skip to content

Order & Order Line Custom Property Editing from Backoffice #750

@john-kehelly-granite

Description

@john-kehelly-granite

Which component is this issue related to?

Umbraco Commerce (Core)

Which Umbraco Commerce version are you using? (Please write the exact version, example: 10.1.0)

15.3.11

Bug summary

When trying to edit custom properties from the backoffice you cant always unset a value. The editor will look like the value has been changed correctly but after saving the order and reloading it, the values will have returned.

There seems to be a difference between a cart and a completed order in when this happens. I've only tested on textbox and toggle fields, there may also be issues on other field types but I've not had the opportunity to test those.

Specifics

On a cart, I'm unable to clear text values or toggles at the cart level. I can clear the text field and set the toggle to false but on saving the record they immediately reset.

On a completed order, at order level I can clear a text value but not a toggle. Again I can edit the field on screen but after saving the record the text field remains clear but the toggle immediately resets to true.

On Order Lines, text values will not allow you to empty them, toggle values wont allow you to set them to false. The editor itself does allow the field to be changed but on clearing the text and/or setting the toggle to false then clicking update on the overlay, if you open the property editor again the values will be as before.

Video showing editing cart level values
https://github.com/user-attachments/assets/df6a5bee-fb4f-4b38-8804-beadc0644ef9

Video showing editing order level values
https://github.com/user-attachments/assets/6a70c35d-cf3a-4e38-a498-bb3ad228f2cc

Steps to reproduce

I've attached a test package json I'm using to define some test values - a textbox and a toggle on both the main order and the individual order lines.

Open any cart and set a value in the text field, set the toggle to true. Save the cart. Reload the screen fully, as expected the values are set. Now clear the text box and set the toggle to false. Save the cart. The the text will have returned and the toggle will have reset to true. A video above shows this.

Open any completed order and set a value in the text field, set the toggle to true. Save the order. Reload the screen fully, as expected the values are set. Now clear the text box and set the toggle to false. Save the order. The the text will remain empty but the toggle will have reset to true. A video above shows this.

On any order line item (either cart or completed order), open the custom properties overlay then set a value in the text field and set the toggle to true. Click the update button to return to the order. Reopen the overlay for the order line item, as expected the text & toggle are set. Clear the text field and set the toggle to false, click update to return to the order. Reopen the overlay and the text field will have populated again and the toggle will have reset to true. Saving the order between these steps does not change the outcome.

umbraco-package.json

Expected result / actual result

Expected result is that I can clear or edit the custom fields to any value they support. Actual result is some values cannot be unset.

Dependencies

No response


This item has been added to our backlog AB#56167

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions