Compare commits

...

4 Commits

2 changed files with 14 additions and 15 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

@@ -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