Submitting runs submitchange events twice |
|||||
Issue descriptionThis problem occurs on CLs like https://chromium-review.googlesource.com/c/chromiumos/infra/lucifer/+/1162668 The UI flow for submitting this CL is: 1. Click Submit 2. Get dialog 1 3. Click Submit 4. Get dialog 2 5. Click Continue 6. Get dialog 1 7. Click Submit 8. Done The page is using the chumpdetector plugin https://chromium.googlesource.com/infra/gerrit-plugins/chumpdetector/+/d3e2efa82950387577d40d23baf26eb81c0e6c9f/src/main/resources/static/chumpdetector.js#530 It adds a submitchange hook to show a confirmation message: self.on('submitchange', function() { // snip --------------------- // Change should be submitted via CQ (not directly via Gerrit). if (config.enforceCommitQueue) { setConfirmSubmitMessage( 'The ' + config.treeName + ' project uses the commit queue (CQ). ' + 'You should submit your change by clicking "Reply" and setting the ' + '"Commit-Queue" label to the appropriate value.\n' + 'Do you want to commit the change directly, bypassing CQ (dangerous)?'); } // snip --------------------- }); This hook gets run twice, once when clicking Submit https://gerrit.googlesource.com/gerrit/+/b84362e37ed478b7e0a80ce0545a963eba1ada99/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions.js#928 and once when clicking on Continue on the submit confirmation dialog that PolyGerrit shows: https://gerrit.googlesource.com/gerrit/+/b84362e37ed478b7e0a80ce0545a963eba1ada99/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions.js#1054 I think one of the _canSubmitChange() calls should be removed (probably the one in _handleSubmitConfirm). I don't see a point in running _canSubmitChange() twice, and the effect is very annoying for the end user.
,
Aug 16
,
Aug 16
Can someone familiar with Infra>CodeReview>Gerrit update the chumpdetector plugin?
,
Aug 27
ping? Sounds like it should be simple to uprev the plugin
,
Sep 6
,
Oct 27
We need to take a look at all the Chromium plugins as we try to change how they are bundled. When we ramp up to learn how to do that it seems like we should do this at the same time.
,
Dec 17
We just rolled out bundled versions of all the plugins last week. My hope is that it included rolling in these new changes and this is fixed, but still need to verify.
,
Jan 11
Setting defect without priority to Pri-2. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by wyatta@google.com
, Aug 16