openfoodnetwork icon indicating copy to clipboard operation
openfoodnetwork copied to clipboard

[Admin][Fees] Wrong behavior when creating fees

Open audez opened this issue 2 years ago • 0 comments

Description

You access the fee page through an enterprise settings. You are directed to the page corresponding to this enterprise: admin/enterprise_fees?enterprise_id=3949 It displays only this enterprise fees, you don't see other enterprises fees.

The problem is that you can still choose another enterprise, create the fee and click "update" - but nothing will happen (on this page...but the fee was actually created behind the scenes).

Expected Behavior

The url should be to: admin/enterprise_fees to be able to manage all fees in the same place (as it's the case for permissions) Or The url remains the specific enterprise page, but the user must not be able to create fees for other enterprises.

Actual Behavior

In the fees creation page, you can only see fees for the specific enterprise you chose. But you can still create fees for another enterprise. As it won't appear when you click "update", you think you created nothing. But in fact, the fee has been created with a value equal to 0 as you weren't able to edit it.

Steps to Reproduce

  1. Click on Enterprises > Settings > Enterprise Fee > Manage enterprise fee
  2. Choose another enterprise in the dropdown list, fill in the fields and click "Update". Nothing happens
  3. Change url to: admin/enterprise_fees (remove the last part)

Animated Gif/Screenshot

1

Screen Shot 2022-08-29 at 20 21 40

2

Screen Shot 2022-08-29 at 20 22 07

3

Screen Shot 2022-08-29 at 20 32 09

Workaround

Create enterprise fee from a specific enterprise settings

Severity

bug-s3: a feature is broken but there is a workaround

audez avatar Aug 29 '22 18:08 audez