Compare commits

..

5 Commits

3 changed files with 15 additions and 16 deletions

View File

@@ -1,11 +0,0 @@
$(function() {
$("input#issue_customer_id").on("change", function() {
$.ajax({
url: "/filter_estimates_by_customer",
type: "GET",
data: { selected_customer: $("input#issue_customer_id").val() }
});
});
});

View File

@@ -14,7 +14,7 @@ Redmine::Plugin.register :redmine_qbo do
name 'Redmine QBO plugin' name 'Redmine QBO plugin'
author 'Rick Barrette' author 'Rick Barrette'
description 'A pluging for Redmine to connect with QuickBooks Online to create Time Activity Entries for billable hours logged when an Issue is closed' description 'A pluging for Redmine to connect with QuickBooks Online to create Time Activity Entries for billable hours logged when an Issue is closed'
version '2026.1.9' version '2026.2.0'
url 'https://github.com/rickbarrette/redmine_qbo' url 'https://github.com/rickbarrette/redmine_qbo'
author_url 'https://barrettefabrication.com' author_url 'https://barrettefabrication.com'
settings default: {empty: true}, partial: 'qbo/settings' settings default: {empty: true}, partial: 'qbo/settings'

View File

@@ -43,7 +43,7 @@ module RedmineQbo
# Create billable time entries # Create billable time entries
def bill_time def bill_time
logger.debug "QBO: Billing time for issue ##{id} - #{subject}" logger.debug "QBO: Billing time for issue ##{id}"
return unless status.is_closed? return unless status.is_closed?
return if assigned_to.nil? return if assigned_to.nil?
return unless Qbo.first return unless Qbo.first
@@ -110,11 +110,21 @@ module RedmineQbo
CustomerToken.get_token self CustomerToken.get_token self
end end
# Titleize the subject before save # Titleize the subject before save , but keep words containing numbers mixed with letters capitalized
def titlize_subject def titlize_subject
self.subject = self.subject.titleize logger.debug "QBO: Titlizing subject for issue ##{self.id}"
self.subject = self.subject.split(/\s+/).map do |word|
# If word is NOT purely alphanumeric (contains special chars),
# or is all upper/lower, we can handle it.
# excluding alphanumeric strings with mixed case and numbers (e.g., "ID555ABC") from being altered.
if word =~ /[A-Z]/ && word =~ /[0-9]/
word
else
word.downcase
word.capitalize
end
end.join(' ')
end end
end end
# Add module to Issue # Add module to Issue