The new OrderRefresh class introduced in #2800223: Create an order refresh process doesn't restrict order refreshing to incomplete orders (carts). So, already completed orders would be modified on load too... So the needsRefresh() function needs to check the state of the given order.

I should have probably classified this as bug, but we can argue, it's an open task to do ;)

This is an observation on reading the last commit. I've gone through the code again now and still can confirm that this check is missing...

CommentFileSizeAuthor
#3 orderrefresh_must_not-2803257-3.patch1.4 KBmglaman

Comments

agoradesign created an issue. See original summary.

mglaman’s picture

Category: Task » Bug report

So this is a bug. it's supposed to only run on orders in the "draft" state. Which is why I think we also need #2802915: Ensure order workflows have "draft" state.

mglaman’s picture

Status: Active » Needs review
StatusFileSize
new1.4 KB

  • bojanz committed f2bf286 on 8.x-2.x authored by mglaman
    Issue #2803257 by mglaman: OrderRefresh must not touch already completed...
bojanz’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

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