diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -31,3 +31,4 @@ 96eb24bea2f5f9258775245e3f09f6fa0a4dda01 3121217a812c956d7dd5a5875821bd73e8002a32 v4.11.0 fa98b454715ac5b912f39e84af54345909a2a805 v4.11.1 3982abcfdcc229a723cebe52d3a9bcff10bba08e v4.11.2 +33195f145db9172f0a8f1487e09207178a6ab065 v4.11.3 diff --git a/docs/release-notes/release-notes-4.11.3.rst b/docs/release-notes/release-notes-4.11.3.rst new file mode 100644 --- /dev/null +++ b/docs/release-notes/release-notes-4.11.3.rst @@ -0,0 +1,40 @@ +|RCE| 4.11.3 |RNS| +------------------ + +Release Date +^^^^^^^^^^^^ + +- 2018-02-14 + + +New Features +^^^^^^^^^^^^ + + + +General +^^^^^^^ + + + +Security +^^^^^^^^ + + + +Performance +^^^^^^^^^^^ + + + +Fixes +^^^^^ + +- Pull requests: fixed problems with opening pull requests when default branches + in repository didn't exist or were closed. + + +Upgrade notes +^^^^^^^^^^^^^ + +- Unscheduled bugfix release fixing pull request opening issues reported. diff --git a/docs/release-notes/release-notes.rst b/docs/release-notes/release-notes.rst --- a/docs/release-notes/release-notes.rst +++ b/docs/release-notes/release-notes.rst @@ -9,6 +9,7 @@ Release Notes .. toctree:: :maxdepth: 1 + release-notes-4.11.3.rst release-notes-4.11.2.rst release-notes-4.11.1.rst release-notes-4.11.0.rst diff --git a/rhodecode/public/js/src/rhodecode/pullrequests.js b/rhodecode/public/js/src/rhodecode/pullrequests.js --- a/rhodecode/public/js/src/rhodecode/pullrequests.js +++ b/rhodecode/public/js/src/rhodecode/pullrequests.js @@ -217,6 +217,12 @@ ReviewersController = function () { prButtonLock(true, null, 'reviewers'); $('#user').hide(); // hide user autocomplete before load + if (sourceRef.length !== 3 || targetRef.length !== 3) { + // don't load defaults in case we're missing some refs... + $('.calculate-reviewers').hide(); + return + } + var url = pyroutes.url('repo_default_reviewers_data', { 'repo_name': templateContext.repo_name, diff --git a/rhodecode/templates/pullrequests/pullrequest.mako b/rhodecode/templates/pullrequests/pullrequest.mako --- a/rhodecode/templates/pullrequests/pullrequest.mako +++ b/rhodecode/templates/pullrequests/pullrequest.mako @@ -202,9 +202,13 @@ // translate our select2 id into a text, it's a mapping to show // simple label when selecting by internal ID. var id, refData; - if (selectedRef === undefined) { + if (selectedRef === undefined || selectedRef === null) { id = element.val(); refData = element.val().split(':'); + + if (refData.length !== 3){ + refData = ["", "", ""] + } } else { id = selectedRef; refData = selectedRef.split(':'); @@ -216,7 +220,6 @@ } var data = {id: id, text: text}; - callback(data); }; }; @@ -415,8 +418,10 @@ }; }; - var initTargetRefs = function(refsData, selectedRef){ + var initTargetRefs = function(refsData, selectedRef) { + Select2Box($targetRef, { + placeholder: "${_('Select commit reference')}", query: function(query) { queryTargetRefs(refsData, query); }, @@ -518,7 +523,9 @@ % if c.default_source_ref: // in case we have a pre-selected value, use it now $sourceRef.select2('val', '${c.default_source_ref}'); + // diff preview load loadRepoRefDiffPreview(); + // default reviewers reviewersController.loadDefaultReviewers( sourceRepo(), sourceRef(), targetRepo(), targetRef()); % endif