Fix Error 500 when referencing issue with project in pending delete
Closes #31215 (closed)
Merge request reports
Activity
mentioned in issue #30864 (closed)
added 1 commit
- 8a570944 - Fix Error 500 when referencing issue with project in pending delete
42 42 end 43 43 end 44 44 45 context 'when project is in pending delete' do 46 it 'redacts an issue attached' do 47 project.pending_delete = true 48 project.save 49 issue = create(:issue, project: project) 42 42 end 43 43 end 44 44 45 context 'when project is in pending delete' do 46 it 'redacts an issue attached' do 47 project.pending_delete = true 48 project.save 49 issue = create(:issue, project: project) 50 redactor = described_class.new(project, user) 51 doc = Nokogiri::HTML.fragment("<a class='gfm' data-reference-type='issue' data-project=\"#{project.id}\" data-issue=\"#{issue.id}\">foo</a>") I just tried to remove
data-project
and without the fix I could still reproduce the issue. I am not completely sure, but it looks likeIssueParser
overridesnodes_visible_to_user
anddata-project
is not used here.I also found that there's also
data-external-issue
, which would usedata-project
. Perhaps we should also add a test for this?
@stanhu I left two comments. Do you want me to take it over and ask for a maintainer to review it?
mentioned in commit 31ea72b6
mentioned in merge request !10843 (merged)
@DouweM What do you think? I also made an MR based on this !10843 (merged) We probably also miss a changelog entry.
added regression label
assigned to @DouweM
@godfat Please feel free to take over. Shall I close this MR in favor of !10843 (merged)?
Edited by Stan Humentioned in commit d3a788da
mentioned in commit 70fece35