Details
-
Bug
-
Resolution: Fixed
-
Medium
-
2.4.0
Description
Calling cancel(KeyedMessage) on a PullRequestOpenRequestedEvent does not display the KeyedMessage in the UI. All that is shown in the UI is the default "stash.service.pullrequest.creationcanceled" KeyedMessage. That is the generic "Pull request creation was canceled." message.
It would be nice to see custom messages included with the generic canceled message.
Example from a custom plugin that listens for the PullRequestOpenRequestedEvent.
i18n.properties
customplugin.pullrequest.cancel="Pull request creation was canceled because the title does not contain a valid JIRA ticket number"
customEventListener.java
@EventListener
public void customEventListener (PullRequestOpenRequestedEvent event)
I am not very familiar with how you send error messages to the UI, but my guess is something in stash-parent/webapp/default/src/main/webapp/static/page/pull-request/create/pull-request-create.soy is not showing the getCancelMessages() from the PullRequestOpenCanceledException
Attachments
Issue Links
- was cloned as
-
BSERV-7828 Calling cancel(KeyedMessage) on a ProjectPermissionGrantRequestedEvent causes exception in the UI
- Closed