Bug #4296
open[ee] Can not create pull requests with reviewers.
0%
Description
Description¶
If i create a PR in CE it works but in EE it fails. I also get no error message.
Steps to reproduce¶
- Create a pr as admin user
- Leave the default reviewer (admin itself) in place
- Try to submit the PR
- Error happens without error message.
Investigations so far¶
The difference is in the data which is posted to the controller. In CE it works and the POST data looks like this:
{u'review_members': [{u'reasons': [], 'user_id': u'2'}], 'target_repo': u'TestRepos/project', 'pullrequest_title': u'Default', 'source_repo': u'TestRepos/project-fork', 'target_ref': u'branch:default:89a6bb805daafd7fd64f398c20163fd393401f0a', 'user': u'', 'pullrequest_desc': u'- fork\r\n- fork\r\n', 'save': u'Submit Pull Request', u'revisions': [u'7fecd3f02a2cc73ac03d267ab234cabbfbb5bf31', u'06c48b467036bba03305640d1fb7854632dce351'], 'source_ref': u'branch:default:06c48b467036bba03305640d1fb7854632dce351'}
In EE it fails and the POST data looks like this:
{'review_members': u'2', 'target_repo': u'TestRepos/project', 'pullrequest_title': u'Default', 'source_repo': u'TestRepos/project-fork', 'target_ref': u'branch:default:89a6bb805daafd7fd64f398c20163fd393401f0a', 'user': u'', 'pullrequest_desc': u'- fork\r\n- fork\r\n', 'save': u'Submit Pull Request', 'revisions': u'06c48b467036bba03305640d1fb7854632dce351', 'source_ref': u'branch:default:06c48b467036bba03305640d1fb7854632dce351'}
Traceback¶
2016-10-24 16:56:06.533 ERROR [rhodecode.controllers.pullrequests] Error creating pull request: review_members: Errors:
The input must be dict-like (not a <type 'unicode'>: u'2')
Traceback (most recent call last):
File "/nix/store/l1rdgp35mnr58w3hww23l3h8q5zbcld7-python2.7-rhodecode-enterprise-ce-4.5.0/lib/python2.7/site-packages/rhodecode/controllers/pullrequests.py", line 411, in create
_form = PullRequestForm(repo.repo_id)().to_python(controls)
File "/nix/store/b6lchaz3i9a7gv71hlh60qgnw5z6k63c-python2.7-FormEncode-1.2.4/lib/python2.7/site-packages/formencode/api.py", line 419, in to_python
value = tp(value, state)
File "/nix/store/b6lchaz3i9a7gv71hlh60qgnw5z6k63c-python2.7-FormEncode-1.2.4/lib/python2.7/site-packages/formencode/schema.py", line 153, in _to_python
new[name] = validator.to_python(value, state)
Invalid: review_members: Errors:
The input must be dict-like (not a <type 'unicode'>: u'2')
Updated by Daniel D about 8 years ago
Both code paths are in CE so it leads me to believe that you're running EE on a different (older) version of CE, could you check ?
Updated by Daniel D about 8 years ago
On second look, it seems you are running the newer version since it is PullRequestForm(repo.repo_id)().to_python(controls)
- it maybe be possible that the javascript hasn't been rebuilt - ie. make web-build
- that's only thing I can think of atm.
Updated by Marcin Kuzminski [CTO] about 8 years ago
- Status changed from New to Feedback
feedback needed.
Updated by Daniel D about 8 years ago
The bug was due to the wrong loading two versions of javascript scripts (EE and CE) on the same page, and the EE version had the old javascript function but it was loaded after rhodecode-components.js - so that was the function that was getting used.
Updated by Marcin Kuzminski [CTO] about 8 years ago
- Status changed from Feedback to Resolved
ok, marking as resolved then