Skip to content

Commit 9051a61

Browse files
committed
Fixed incorrecter tagger in dashboard pages (issue-276)
1 parent c0bf1a3 commit 9051a61

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

releases.moxie

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ r18: {
1818
- Reset dashboard and activity commit cache on branch REWIND or DELETE
1919
- Fixed bug with adding new local users with external authentication
2020
- Fixed missing clone url on the empty repository page
21+
- Fixed incorrect tagger in the dashboard pages (issue-276)
2122
changes:
2223
- updated Chinese translation
2324
- updated Dutch translation
@@ -37,6 +38,7 @@ r18: {
3738
- Chad Horohoe
3839
- Eduardo Guervós Narvaez
3940
- Dongsu, KIM
41+
- Gareth Collins
4042
}
4143

4244
#

src/main/java/com/gitblit/wicket/panels/DigestsPanel.java

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import org.apache.wicket.markup.repeater.Item;
2929
import org.apache.wicket.markup.repeater.data.DataView;
3030
import org.apache.wicket.markup.repeater.data.ListDataProvider;
31+
import org.eclipse.jgit.lib.PersonIdent;
3132

3233
import com.gitblit.Constants;
3334
import com.gitblit.GitBlit;
@@ -42,7 +43,6 @@
4243
import com.gitblit.wicket.pages.SummaryPage;
4344
import com.gitblit.wicket.pages.TagPage;
4445
import com.gitblit.wicket.pages.TreePage;
45-
import com.gitblit.wicket.pages.UserPage;
4646

4747
public class DigestsPanel extends BasePanel {
4848

@@ -111,17 +111,16 @@ public void populateItem(final Item<DailyLogEntry> logItem) {
111111
}
112112
logItem.add(changeIcon);
113113

114-
if (!isTag) {
115-
logItem.add(new Label("whoChanged").setVisible(false));
116-
} else {
117-
if (change.user.username.equals(change.user.emailAddress) && change.user.emailAddress.indexOf('@') > -1) {
118-
// username is an email address can not link - 1.2.1 push log bug
119-
logItem.add(new Label("whoChanged", change.user.getDisplayName()));
114+
if (isTag) {
115+
// tags are special
116+
PersonIdent ident = change.getCommits().get(0).getAuthorIdent();
117+
if (!StringUtils.isEmpty(ident.getName())) {
118+
logItem.add(new Label("whoChanged", ident.getName()));
120119
} else {
121-
// link to user account page
122-
logItem.add(new LinkPanel("whoChanged", null, change.user.getDisplayName(),
123-
UserPage.class, WicketUtils.newUsernameParameter(change.user.username)));
120+
logItem.add(new Label("whoChanged", ident.getEmailAddress()));
124121
}
122+
} else {
123+
logItem.add(new Label("whoChanged").setVisible(false));
125124
}
126125

127126
String preposition = "gb.of";

0 commit comments

Comments
 (0)