summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/git
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-03-12 22:25:52 -0400
committerJames Moger <james.moger@gitblit.com>2014-03-12 22:25:52 -0400
commit1207947afee4d7fbd2ee374339d5e84bb0528e9a (patch)
tree6498460efdb772b39196b6903898cdde33ef7662 /src/main/java/com/gitblit/git
parentb8e1fa94f3f28a94b466c79b1a4b24c6fd755df1 (diff)
downloadgitblit-1207947afee4d7fbd2ee374339d5e84bb0528e9a.tar.gz
gitblit-1207947afee4d7fbd2ee374339d5e84bb0528e9a.zip
Fix TicketModel modList bug when a field was set multiple times
Diffstat (limited to 'src/main/java/com/gitblit/git')
-rw-r--r--src/main/java/com/gitblit/git/PatchsetReceivePack.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/com/gitblit/git/PatchsetReceivePack.java b/src/main/java/com/gitblit/git/PatchsetReceivePack.java
index d3d0b1df..bdba8b91 100644
--- a/src/main/java/com/gitblit/git/PatchsetReceivePack.java
+++ b/src/main/java/com/gitblit/git/PatchsetReceivePack.java
@@ -163,11 +163,11 @@ public class PatchsetReceivePack extends GitblitReceivePack {
/** Extracts the ticket id from the ref name */
private long getTicketId(String refName) {
+ if (refName.indexOf('%') > -1) {
+ refName = refName.substring(0, refName.indexOf('%'));
+ }
if (refName.startsWith(Constants.R_FOR)) {
String ref = refName.substring(Constants.R_FOR.length());
- if (ref.indexOf('%') > -1) {
- ref = ref.substring(0, ref.indexOf('%'));
- }
try {
return Long.parseLong(ref);
} catch (Exception e) {