1. Bitbucket
  2. Public Issue Tracker
  3. master

Issues

Issue #4954 open

Can't revert a declined pull-request action (BB-6192)

Matthieu Perrot
created an issue

If someone of your team decline a pull request by mistake, you can't revert this operation even if your are the owner/manager of the repository with all admin rights. The alternative is to retry with a new pull-request, with the caveat of producing a spurious duplicate of the former pull-request.

In addition, it seems also strange that a pull request can be declined even if all participants have approved it !

Official response

Comments (119)

  1. Dylan Etkin

    Hi Matthieu,

    I think you are correct that we should allow you to re-open a declined PR.

    I would hesitate to not allow you to decline just because folks have approved. We are aiming for a light-weight approval system and I think that would start to dicate workflow a bit too much.

    Cheers,

    Dylan

  2. Christian Walther

    Seconding the wish for a possibility to reopen declined pull requests.

    I have a couple of pull requests that I have no idea how they ended up declined (the Activity tab shows no record of anyone declining them) (may have something to do with #4900), and I’d like to reopen them.

  3. Jon

    +11 for having a confirmation dialog if you try to decline a PR when one or more reviewers have approved it. Allow, but warn :) Ah... separate feature - I'll see if it exists and create a feature request if not.

    edit Issue #8346 created for this sidekick request

  4. bean5

    I once removed a branch remotely and then pushed a new version, but a hook took that as a command to decline the PR. Just because it was empty for the 5 seconds I took between commands doesn't mean I wanted to decline it. I just wanted to swap out the code for the right code. (So if a branch is empty, it is still a valid PR...just with no diff to show.)

    Maybe this is another problem, but is related and was the main cause of accidental irreversible DECLINEs on PRs.

  5. David Meister

    Is this really a feature request or a massive bug in the system? This really needs to be fixed. It's been 2 years since this thread was opened (I'm willing to bet that Atlassian internally knew about this issue long before it was publicly reported) and there's still a largely undocumented button that FUBARs your PRs prominent in the UI.

  6. bean5

    No idea...could the creator of this request please change it to a non-minor priority? I don't think it should be difficult at all to be able to flip a boolean in the database (declined/not).

  7. bean5

    I agree. But the fix should be fairly intuitive.

    On a positive note, it looks like the decline button, even if accidentally hit will request the user to provide a reason to decline, which mitigates the possibility of accidentally pushing the button. I don't have much of a problem with the button itself. I have a problem with the fact that the PR was automatically declined when the branch was removed. Now that I know more about BB, I wonder if there was a hook involved. I'm going to look into that...

  8. bean5

    Yeah, looks like there is a "hook" involved that can't be disabled. The PR realizes that there is nothing to commit and determines that that means "decline". Git can revert reverts, so it makes sense to be able to undo a decline. I vote for the ability to reverse a decline.

  9. Rick Cuddy

    +1 etc etc

    Really want a workflow based around declining because of problems that can and should be fixed, to replicate workflows such as Phabricator where approval indicates request can be merged, where decline indicates work remains to be done.

  10. Victor Engel

    +1 I also just declined a PR and can't reverse the decline. Not good. I declined because of a perceived problem. When the problem is resolved, the PR should be able to proceed.

  11. Anonymous

    This was first brought up as an issue 3 years ago. How long does it take Atlassian to implement features? Yes, don't dictate workflow, but also do not tie our hands. I have several comments to create tasks from a pull request that has already been declined. In not allowing us to re-open it, you've already dictated workflow.

  12. bean5

    Should we update this to be a "bug" rather than new feature? I really thought that I'd be able to un-decline. Was anyone else thrown off by this?

  13. bean5

    I was able to "recover" using the work-around of making another PR. But since I call that a work-around, I guess I agree. This is a bug in my book.

  14. Tri Nguyen

    Please vote and not comment a "+1". You can also follow this issue by watching it. This will avoid spamming all existing watchers with the noise. Perhaps we should say this explicitly in the description of the issue.

  15. Tim Ahrens

    Try finding documentation on what the "Decline" button does?? Does it mean I declined to do the review because I don't have time, OR does it mean I think the code cannot be released without the corrections I have suggested?? A simple mouseover tool tip would go a long way to clarifying this. So, I am very reluctant to click it not knowing what will happen when I do click Decline. Can someone please tell me?

  16. bean5

    Tim Ahrens Currently it marks the pull request as declined. If I recall correctly it will ask you to fill in a reason why you are declining it. It is currently irreversible (hence this ticket). I only decline a branch if a ticket is going to be closed or if we want to totally restart the branch, but leave the ticket open. This happens if we find we went down the wrong path for a ticket, but for some reason want to keep a history of the first attempt. This is only necessary if the pull request has a lot of history on it. If it doesn't have comments, I'd suggest just replacing the branch with a new set of commits. (Be careful when replacing branches, though. Sometimes in the process of rebasing a branch the remote one is removed, which can automatically trigger the decline action.)

  17. John Schank

    Agreed, not know what it does is the worst. There is an approve button, so logically I assumed declined meant that I reviewed it, but did not approve. Which, BTW, would be a good button to have.

  18. bean5

    If you don't approve, I think the idea is that you are using JIRA and therefore take a ticket out of review stage and put it back into "Dev" or something like that. If you have reviewed, the developer(s) know it because of the state change there and because you left a comment which has your name listed as the commenter. But having an official "Done reviewing this round" might be a good way to let the developer(s) know that you are done and it is basically ready for them--at least in relation to your comments. If there are multiple reviewers, it might still be in review.

  19. bean5

    Jayd Lawrence If Stash has this and BB doesn't, I think that would be a bug as one expects Stash and BB to only differ in features that set them apart. Is revert decline meant to be a differing feature?? I hope not. Matthieu Perrot do you know? If so, you may want to refile this under bug rather than as proposal.

  20. Stephen Sykes

    OMG still not resolved? Just accidentally declined (not fully understanding Atlassian's workflow here - and decline seems to be usable as "not until issues are addressed" versus "NEVER"). Now we're stuck.

  21. bean5

    Dylan Etkin do you mean to say that a workflow that includes an 'un-decline' doesn't make sense? It happens in real life. Sometimes something is declined purely because of timing, but when the moment is right, is re-approved. That is how some technology works.

    Un-decline is a natural process, doesn't dictate workflow any more than the person choosing to push the button corresponding to it.

  22. Joshua Swanson

    bean5 No, check it again - what he said was that an un-decline makes sense, but it doesn't make sense to prevent declining because someone has approved it - which I completely agree with.

    Still, the key point here is that it's been four years with no action on this... and we really need to see some!

  23. John Schank

    It’s actually worse than that. The buttons imply that you are declining your review. But you’re really rejecting the PR and once you do. You’re screwed. There is no way to say: “I’ve reviewed this, and I want to mark it as NOT approved”

  24. Ben Echols staff

    We're looking at ways to improve the PR review workflow and make the UI clearer, but we're not currently planning to work specifically on reopening declined PRs.

  25. Jacek Kobus

    well we can force our interns to create new pr's for every fix they make and fail but that's just a plain cruelty. Lack of this feature is annoying for someone who has to work with bb everyday, so if there's nothing else left, we'll move somewhere else.

  26. Eelke Blok

    Personally I value a well-conducted usability test which is then used as input by a UX expert to come up with a good solution a lot more than what users say they need. No offence. We're all software developers, so we've all been there, right?

    The latest Bitbucket Server (aka Stash) has a concept where each reviewer can either mark a PR as approved or "needs work" (that is without actually declining the pull request). To me that seems a better approach (not to mention a lot friendlier) than outright declining the PR. If the same workflow would be introduced on bitbucket.org, to me that would reduce this issue (not being able to re-open a declined pull request) to maybe a slight inconvenience that I could live with perfectly fine. Actually - and I might be going too far now - it even makes sense, in a way. With this "needs work" workflow in place, if the PR is actually declined instead of simply marked to need some additional work, that would indicate it will not be considered to be merged in the immediate future. Only from a usability/undo perspective does it make sense to allow it to be re-opened, then.

  27. obutterfield NA

    I submitted a PR, had a good flow of comments on it and a team member declined it in error.

    Given that Atlassian seems to be all about workflow and tooling, what would be their suggested way of smoothly getting back to the the point pre-decline, with all comments intact?

  28. Mike Gruen

    Why bother? Both are equally ignored. It's been "new" for nearly 4 years, been in and out of the top 10 most voted for issues (currently no. 11), and seemingly not too hard to fix.

    We've pretty much modified our workflow to use Tasks to indicate when a PR is not ready to go due to outstanding work which can sometimes result in very long-lived PRs. In cases where we really do want to abandon the work done to date, we will decline a PR and then, when a new PR is issued, have the new PR's summary link back to the original PR so that the reviewers can see the full history.

    With better filtering, sorting, and labeling functionality on the page that lists all open PRs, this wouldn't be as bad of a problem -- aside from the "oops, I declined this by accident" problem. If Declined is truly a dead-end state, then maybe not every reviewer should have permission to press the button.

  29. Rob de Bruin

    Finally ☺

    Verzonden: donderdag 21 juli 2016 0:44 Aan: Rob de Bruin Onderwerp: Re: [Bitbucket] Issue #4954: Can't revert a declined pull-request action (BB-6192) (site/master)

    [https://avatar-cdn.atlassian.com/1b865b19d2e9289ad4376ba456992800?s=32&ts=1469050882]

    Ben Echols commented on issue #4954:

    Can't revert a declined pull-request action (BB-6192)https://bitbucket.org/site/master/issues/4954/cant-revert-a-declined-pull-request-action

    Eelke Blokhttps://bitbucket.org/eelkeblok/, you're right on - we're focusing on how to improve the pull request workflow with options like Bitbucket Server's reviewer statushttps://blog.bitbucket.org/2016/04/07/get-to-master-faster-with-pull-requests-in-bitbucket-server/ so it's easy to indicate when something needs work, rather than completely declining it. I don't have a date for availability in Bitbucket Cloud, but it's on the roadmap.

    View this issuehttps://bitbucket.org/site/master/issues/4954/cant-revert-a-declined-pull-request-action or add a comment by replying to this email.

    Unwatch this issuehttps://bitbucket.org/api/1.0/repositories/site/master/issue/4954/unwatch/rdebruin/efb3c01baa01b774967bb73004e8f3a3ebb3ec37/ to stop receiving email updates.

    [https://d301sr5gafysq2.cloudfront.net/22e85fb8da88/img/email/logo.gif]https://bitbucket.org

  30. Log in to comment