Skip to content

Commit b74a0f9

Browse files
authored
Fixed issue where creating a reference of an issue would create a tag with the full name instead of the username if this is the default in the .ini file (#17074)
Adds an extra attribute to every issue comment containing the actual username, such that it can be used to tag the original author when clicking on "Reference in new issue" (#17073) Fix #17073
1 parent 8fb3a50 commit b74a0f9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

templates/repo/issue/view_content/context_menu.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<div class="item context" data-clipboard-text="{{$referenceUrl}}">{{.ctx.i18n.Tr "repo.issues.context.copy_link"}}</div>
1818
<div class="item context quote-reply {{if .diff}}quote-reply-diff{{end}}" data-target="{{.item.ID}}">{{.ctx.i18n.Tr "repo.issues.context.quote_reply"}}</div>
1919
{{if not .ctx.UnitIssuesGlobalDisabled}}
20-
<div class="item context reference-issue" data-target="{{.item.ID}}" data-modal="#reference-issue-modal" data-poster="{{.item.Poster.GetDisplayName}}" data-reference="{{$referenceUrl}}">{{.ctx.i18n.Tr "repo.issues.context.reference_issue"}}</div>
20+
<div class="item context reference-issue" data-target="{{.item.ID}}" data-modal="#reference-issue-modal" data-poster="{{.item.Poster.GetDisplayName}}" data-poster-username="{{.item.Poster.Name}}" data-reference="{{$referenceUrl}}">{{.ctx.i18n.Tr "repo.issues.context.reference_issue"}}</div>
2121
{{end}}
2222
{{if or .ctx.Permission.IsAdmin .IsCommentPoster .ctx.HasIssuesOrPullsWritePermission}}
2323
<div class="divider"></div>

web_src/js/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -997,7 +997,7 @@ async function initRepository() {
997997
const content = $(`#comment-${$this.data('target')}`).text();
998998
const subject = content.split('\n', 1)[0].slice(0, 255);
999999

1000-
const poster = $this.data('poster');
1000+
const poster = $this.data('poster-username');
10011001
const reference = $this.data('reference');
10021002

10031003
const $modal = $($this.data('modal'));

0 commit comments

Comments
 (0)