I’m having difficulty removing the customer entity when the Add Ticket Command is Executed.
It appears that all entity information is cloned over when the command is being executed, however, I just want the table to be carried over, not the customer. The way we’re using it, when we press Add Ticket, it’s so that we can add another customer’s order to the same table.
I’ve tried several methods and have been able to remove the customer when the command is executed, however it removes the customer from the last ticket (presumably the ticket with the highest ticket ID) and the new ticket. This happens regardless of whether the command is executed when a ticket is displayed or when the command is executed from the ticket list screen. I’ve changed the mapping so that the Add Ticket buttons shows up on the ticket list screen for the table as well so that we don’t have to click on a specific ticket in order to add one. Just saves us a step, is all.
I’m just trying to make things as easy as possible for my staff. There have been times when they’ve added a ticket, an order, and closed it out without changing the customer. Then they get distracted and forget to fix it. We get pretty busy and anything I can do to make things faster and simpler for them keeps them happy, which keeps our customers happy. If I can a way to accomplish this, then when they forget it won’t be as confusing as if there were two tickets with the same customer name on them.
I’ll post my attempts, but that’s precisely the action I tried to use, yet every time I’ve tried to attach that action to a rule, it’s always removed the customer from the “last ticket” at the table along with the newly created ticket.
Again, it’s minor, but I haven’t figured it out yet, fwiw.
You used the wrong event. Use ticket created event and put a constraint to check if table entity exists. If table exists then execute if not then don’t execute.