frontend icon indicating copy to clipboard operation
frontend copied to clipboard

Policy Condition Fails to Update

Open phptek opened this issue 2 years ago • 2 comments

Current Behavior

Attempting to update an "Age" Policy condition should allow me to change the operator e.g. from < to >, but upon making the change, and reloading my browser, the change is lost.

Steps to Reproduce

  1. [OK] Login to DT
  2. [OK] Navigate to Project > Policy Management
  3. [OK] Create new "Age" condition
  4. [OK] Select previously created "Age" condition
  5. [FAIL] Attempt to change the operator
  6. [FAIL] Observe that operator has changed by reloading the page in the browser and selecting the previous "Age" condition

Expected Behavior

Expected the "Updated" dialogue to appear when the operator was changed and for the operator to be changed e.g. from < to >

Version is actually 4.8.2 development version built with docker-compose on Ubuntu 22.04, but this version isn't selectable.

Dependency-Track Frontend Version

4.8.1

Browser

Brave Browser

Browser Version

Brave Browser 1.50.119

Operating System

Linux

Checklist

phptek avatar May 30 '23 04:05 phptek

I can reproduce this but there seems to be an easy workaround.

When editing and having tweaked the operator from from < to > (or whatever), you will notice that there is no notification popping up to say that the policy has been updated.

Thus, also tweak the age value from (say) P5Y to P6Y. This will save the policy (including your desired > ). Then change the P6Y back to P5Y (resulting in another save). You can now navigate away from the policy management screen and then return again to check that things are OK.

For me, the real solution to the problem would be to add a "save" (or "submit") button to the screen so that you make the changes that you need and then commit them in one save operation. This is something that I logged previously as #421

msymons avatar May 31 '23 13:05 msymons