diff --git a/app/views/customers/show.html.erb b/app/views/customers/show.html.erb index c4ace1d..71529d1 100644 --- a/app/views/customers/show.html.erb +++ b/app/views/customers/show.html.erb @@ -1,4 +1,4 @@ -

<%=t(:field_customer)%> #<%= @customer.id %> - <%= link_to @customer.to_s, "https://app.qbo.intuit.com/app/customerdetail?nameId=#{@customer.id}", target: :_blank %>

+

<%=t(:field_customer)%> #<%= @customer.id %> - <%= link_to @customer.to_s, "https://#{Setting.plugin_redmine_qbo['sandbox'] ? "sandbox" : "app"}.qbo.intuit.com/app/customerdetail?nameId=#{@customer.id}", target: :_blank %>

diff --git a/init.rb b/init.rb index f5105ca..bb763a5 100644 --- a/init.rb +++ b/init.rb @@ -14,7 +14,7 @@ Redmine::Plugin.register :redmine_qbo do name 'Redmine QBO DEVELOPMENT plugin' author 'Rick Barrette' description 'This is a plugin for Redmine to intergrate with Quickbooks Online to allow for seamless intergration CRM and invoicing of completed issues' - version '2026.1.0' + version '2026.1.1' url 'https://github.com/rickbarrette/redmine_qbo' author_url 'https://barrettefabrication.com' settings :default => {'empty' => true}, :partial => 'qbo/settings' diff --git a/lib/hooks/issues_form_hook_listener.rb b/lib/hooks/issues_form_hook_listener.rb index 7fa1d0b..116ffac 100644 --- a/lib/hooks/issues_form_hook_listener.rb +++ b/lib/hooks/issues_form_hook_listener.rb @@ -12,6 +12,8 @@ module Hooks class IssuesFormHookListener < Redmine::Hook::ViewListener + include IssuesHelper + # Edit Issue Form # Here we build the required form components before passing them to a partial view formatting. def view_issues_form_details_bottom(context={}) @@ -29,7 +31,7 @@ module Hooks selected_estimate = issue.estimate ? issue.estimate.id : nil # Gernerate edit.js link - js_link = issue.new_record? ? "updateIssueFrom('/projects/rmt/issues/new.js', this)" : "updateIssueFrom('/issues/#{issue.id}/edit.js', this)" + js_link = "updateIssueFrom('#{escape_javascript update_issue_form_path(issue.project, issue)}', this)" # Load customer information customer = Customer.find_by_id(selected_customer) if selected_customer