| Issue 2231: | JS API self.onAction appears to be broken for 'revision' types | |
| 1 person starred this issue and may be notified of changes. | Back to list |
Affected Version: MASTER What steps will reproduce the problem? 1. Checkout, build and deploy everything (including the cookbook plugin) 2. Go to a review 3. Choose 'Say Hello' 4. Notice that no input box (greeting message) is shown What is the expected output? What do you see instead? On the 'Project' page an info box is shown (asking for a Greeting message) and a checky-box for french translation. This should also happen on the Review page. Please provide any additional information below. It appears that when onAction is *not* called (no action is registered), the default action is just to show an alert with the result of UiAction#apply, and this is *exactly* what happens when onAction is called with the 'revision' type. I've also tried to change the function of 'function onSayHelloRevision(c)' and no matter what I have this function do, only a simple alert is ever shown.
Jan 15, 2014
That's correct JS API is only available on new change screen and project info screen. Old change screen is deprecated and going to be removed in the future version of Gerrit.
Status:
WontFix
Jan 15, 2014
And the /c2/ URL is deprecated because the new change screen (aka ChangeScreen2) is now served under the normal (old) change URL. |
|
| ► Sign in to add a comment |
After some debugging (mostly $wnd.alert since I'm not sure how to effectively debug the compiled GWT code), I found out that this example works with 'change screen 2'. That is: /* DEPRECATED URL */matchPrefix("/c2/", token) So if I use /c2/ in my change screen URL, then things work as expected. I don't know if ChangeScreen 2 is the 'new' change screen? (I'm not really sure why the comment says deprecated). So maybe this isn't a bug -- maybe this API is only available in c2? thoughts?