Page MenuHomePhorge

Herald Rule Creation Page: fix Back button in some cases
ClosedPublic

Authored by valerio.bozzolan on Mar 23 2023, 15:48.

Details

Summary

If you want to create a new Herald Rule, sometime,
like for new "Object" Herald Rules, the Back button just
sends you to the very same page you already were.

The risk is that an employee could receive a specific
instruction, such as "Hey Alfreda, Go back, now"
and at this point Alfreda goes into an incredible loop
continuing to click the Back button until the duration
of the universe (since Phorge is so stable that it's able
to handle that "Back spike" forever - really).

https://we.phorge.it/T15184

Note that this also tries to avoid to change the base URI
to just go Back. For example, before this change, the Back
button was trying to send from /create/ to /new/, but
apparently they are just aliases.

Closes T15184

Test Plan
  • Visit the page /herald/create/?adapter=commit
  • Click on "Object"
  • Click on "Back"
  • Verify that you only went back one screen, and not just forward in time

Diff Detail

Repository
rP Phorge
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

valerio.bozzolan updated this revision to Diff 376.

make linter happy

src/applications/herald/controller/HeraldNewController.php
336–337

In fact, this modification is totally cosmetic ↑

The important change is just this one ↓

@Matthew thank you in the other Diff

If you want even more fun... here an easy peasy Diff :) don't tell anyone

This revision is now accepted and ready to land.Mar 27 2023, 18:22