Compare commits

...

4 Commits

Author SHA1 Message Date
ricky c8f115ae02 removed unused js 2026-02-06 19:28:42 -05:00
ricky d59e52b111 removed subject from logs 2026-02-06 18:58:16 -05:00
ricky 2c3548d1ac Added logging 2026-02-06 18:55:49 -05:00
ricky d80007bc84 Titleize the subject before save , but keep words containing numbers mixed with letters capitalized 2026-02-06 18:52:11 -05:00
2 changed files with 14 additions and 15 deletions
-11
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() }
});
});
});
+14 -4
View File
@@ -43,7 +43,7 @@ module RedmineQbo
# Create billable time entries
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 if assigned_to.nil?
return unless Qbo.first
@@ -110,11 +110,21 @@ module RedmineQbo
CustomerToken.get_token self
end
# Titleize the subject before save
# Titleize the subject before save , but keep words containing numbers mixed with letters capitalized
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
# Add module to Issue