Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Once I have merged a PR can I Decline it ? will it change the code merged ?

Harish Kumar Majeti
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 5, 2018

I have a JIRA J1 and J2, I have opened PR for J1 but it has been linked to two Jira issues, J1 and J2, I have merged the code changes in J1 , now the J1 and J2 show PR merged which should not show on J2 as the files which have changes are completely different, what would happens if I decline the PR on J2 having the file changes related to J1, will it change the code merged into master ? 

Thanks in advance

1 answer

1 accepted

0 votes
Answer accepted
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 6, 2018

If it is a single PR, which I think is the case here, you can not decline it for one JIRA issue and not the other. The PR has commits related to 2 JIRA issues but you still have only one PR. And once that PR is merged, all the commits in it are merged as well.

The way to revert the code from master is to either revert the merge commit (thereby removing code related to both issues) or by reverting the individual commits related to your second JIRA issue (J2). Even if you do that, status of the PR on those issues will reflect what is on the PR.

Going forward, you might want to create multiple feature branches for your JIRA issues and start working on them. That way, you wouldn't run into this issue.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events