プロジェクト

全般

プロフィール

Vote #79605

未完了

Can't use back_url in Documents

Admin Redmine さんが約2年前に追加. 約2年前に更新.

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
Documents_4
対象バージョン:
-
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
4
version_id:
0
issue_org_id:
29826
author_id:
363529
assigned_to_id:
0
comments:
0
status_id:
1
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
141
ステータス-->[New]

説明

Hello, I'm developing an feature for existing open source redmine plugin (ERPMine).
I already found a way to connect CRM contacts, accounts, and leads with projects, documents, issues etc.
What now I'm trying to is to allow creation of new document, issue, project etc. from ERPMine CRM.

<%= link_to l(:label_new_item, l(:field_issue)), url_for(controller: "issues", action: "new", project_id: 'project_id', "issue[custom_field_values][#{wkcustomfield.custom_field.id.to_s}]" => entry.id, :continue => true, :back_url => request.fullpath), class: 'icon icon-time-add', id: link_id, onclick: "get_project(event, '#{link_id}', '#{select_id}')".html_safe %>
(get_project is a javascript that replace "project_id" with project id)
And it works for issues. After I create new issue it redirect me to lead/account/contact as it should.
But It doesn't work for documents...
<%= link_to l(:label_new_item, l(:label_document_plural)), url_for(controller: "documents", action: "new", project_id: 'project_id', "document[custom_field_values][#{wkcustomfield.custom_field.id.to_s}]" => entry.id, :continue => true, :back_url => request.fullpath), class: 'icon icon-time-add', id: link_id, onclick: "get_project(event, '#{link_id}', '#{select_id}')".html_safe %>
I know had read documents controller, and I see the part:
redirect_to document_path(@document)
However it still inherits from ActiveRecord::Base which have back_url. Shouldn't it still work? Am I doing something wrong, or is it impossible to do it without editing DocumentsController?

Admin Redmine さんが約2年前に更新

  • カテゴリDocuments_4 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0