Project

General

Profile

Actions

Defect #43804

open

Custom field preview does not work on bulk issue edit

Added by Kenta Kumojima 21 days ago. Updated 15 days ago.

Status:
Confirmed
Priority:
Normal
Assignee:
-
Category:
UI
Target version:
Resolution:
Affected version:

Description

The preview for custom fields does not work on the bulk issue edit screen.

Steps to reproduce

1. Create a custom field. Set the format to Long text, and enable Text formatting and Full width text.
2. Access /issues and select multiple issues from different projects.
3. Choose Bulk edit from the context menu.
4. Enter text into the custom field, then click the Preview tab. The content is not displayed.

PreviewsController#issue expects project_id, but project_id is not sent from the bulk edit preview request.
As a result, the preview request returns 404, and the preview is not displayed.


Files

fix_preview_path.patch (1011 Bytes) fix_preview_path.patch Kenta Kumojima, 2026-02-09 07:17
Actions #1

Updated by Kenta Kumojima 21 days ago

This patch changes the custom field preview to use preview_text_path, in the same way as comments.

Actions #2

Updated by Go MAEDA 21 days ago

  • Status changed from New to Confirmed
  • Target version set to Candidate for next minor release
Actions #3

Updated by Go MAEDA 19 days ago

Thank you for reporting this issue.

I found that this patch introduces a regression in existing behavior. During bulk edit within a single project, project-scoped wiki syntax is no longer rendered correctly in preview. For example, links that depend on @project, such as [[Another_page]] and version:"2.0", are not linkified.

To fix this, I suggest continuing to use preview_issue_path, and falling back to preview_text_path only when @project is not set.

diff --git a/app/views/issues/bulk_edit.html.erb b/app/views/issues/bulk_edit.html.erb
index 6adc5a0ef..7b70ae1be 100644
--- a/app/views/issues/bulk_edit.html.erb
+++ b/app/views/issues/bulk_edit.html.erb
@@ -213,7 +213,8 @@
     <label><%= custom_field.name %></label>
     <%= custom_field_tag_for_bulk_edit('issue', custom_field, @issues, @issue_params[:custom_field_values][custom_field.id.to_s]) %>
   </p>
-  <%= wikitoolbar_for "issue_custom_field_values_#{custom_field.id}", preview_issue_path(:project_id => @project, :issue_id => nil) if custom_field.full_text_formatting? %>
+  <% preview_url = @project ? preview_issue_path(:project_id => @project, :issue_id => nil) : preview_text_path %>
+  <%= wikitoolbar_for "issue_custom_field_values_#{custom_field.id}", preview_url if custom_field.full_text_formatting? %>
 <% end %>

 </fieldset>
Actions #4

Updated by Kenta Kumojima 19 days ago

Go MAEDA wrote in #note-3:

To fix this, I suggest continuing to use preview_issue_path, and falling back to preview_text_path only when @project is not set.

Thank you for your feedback. I agree that your proposed patch is a better approach.

Actions #5

Updated by Go MAEDA 15 days ago

  • Target version changed from Candidate for next minor release to 6.1.2

Setting the target version to 6.1.2.

Actions

Also available in: Atom PDF