Build issue descriptions and pick templates from the estimate's jobs

Creating issues from an estimate now groups its lines into jobs
(subtotals end a job; parts go with the labor line before them, or the
job's first labor line when listed first), adds the estimate's notes and
the job's parts to each issue's description, preselects the template
whose note has matching "Match:" phrases, and uses a named labor
service's name (e.g. Standard Alignment) as the subject.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-21 21:11:00 -05:00
1 parent 0aa95918f6
commit 7894e09f05
13 files changed
+603 -20

No files matched your search

@@ -12,7 +12,7 @@ module RedmineQboBilling
# Optional support for redmine_issue_templates (https://github.com/agileware-jp/redmine_issue_templates).
# Everything here returns empty results when that plugin isn't installed or isn't enabled on the project.
module IssueTemplateSupport
Option = Struct.new(:key, :title, :tracker_id, :is_default, :description, :group, keyword_init: true)
Option = Struct.new(:key, :title, :tracker_id, :is_default, :description, :group, :match_phrases, keyword_init: true)
module_function
@@ -51,7 +51,8 @@ module RedmineQboBilling
tracker_id: template.tracker_id,
is_default: template.is_default?,
description: template.description,
group: group
group: group,
match_phrases: TemplateMatcher.phrases(template.try(:note))
)
end
end