Add preview page for creating issues from an estimate

- "Create Issues from Estimate" now opens a preview listing each
  matching estimate line: include checkbox, subject (from the line
  description), tracker dropdown, template dropdown and estimated
  hours (from the line quantity)
- Admins set which QBO item codes to look for (e.g. Labor, Alignments)
  and a default tracker in the plugin settings
- Optional redmine_issue_templates support: templates supply the issue
  description; titles still come from the line description
- New appointment_estimate_issues table records which issue came from
  which estimate line, so a line can't be turned into an issue twice;
  deleting the issue frees the line again
- Creation is all-or-nothing; errors are shown on the preview page
- Removes the old Labor-only create_issues_from_labor_lines code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
This commit is contained in:
Claude committed 2026-10-28 20:34:06 -04:00
1 parent 73115da2b9
commit 184c1e2464
15 files changed
+613 -92

No files matched your search

@@ -15,9 +15,7 @@
<% end %>
<% if @appointment.estimate && User.current.allowed_to?(:create_customer_appointment_issues, nil, global: true) %>
<%= link_to create_issues_customer_appointment_path(@appointment),
method: :post,
data: { confirm: l(:text_are_you_sure) } do %>
<%= link_to issues_preview_customer_appointment_path(@appointment) do %>
<i class="fa-solid fa-list-check"></i> <%= l(:button_create_issues_from_estimate) %>
<% end %>
<% end %>