https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292010-07-19T20:10:28ZRedmineRedmine - Patch #5714: Request for controller_issues_bulk_edit_after_save hookhttps://www.redmine.org/issues/5714?journal_id=184562010-07-19T20:10:28ZHolger Just
<ul></ul><p>You could register your code to the default active record <code>before_save</code> hook of the Journal and/or the Issue model. Also, the current journal is available as the <code>@current_journal</code> instance variable in the controller.</p> Redmine - Patch #5714: Request for controller_issues_bulk_edit_after_save hookhttps://www.redmine.org/issues/5714?journal_id=184832010-07-19T21:32:43ZMischa The Evil
<ul><li><strong>Category</strong> changed from <i>Issues</i> to <i>Plugin API</i></li><li><strong>Assignee</strong> set to <i>Eric Davis</i></li></ul><p>Eric, hook-requests are to be assigned to you as I remember correctly... ;/</p> Redmine - Patch #5714: Request for controller_issues_bulk_edit_after_save hookhttps://www.redmine.org/issues/5714?journal_id=190482010-08-06T09:01:17ZAndriy Lesyuk
<ul></ul><p>Holger Just wrote:</p>
<blockquote>
<p>You could register your code to the default active record <code>before_save</code> hook of the Journal and/or the Issue model. Also, the current journal is available as the <code>@current_journal</code> instance variable in the controller.</p>
</blockquote>
<p>The <code>before_save</code> hook is called <ins>before</ins> the Journal is created. That is if an external tool tries to get such Journal by ID it failes to find it...</p> Redmine - Patch #5714: Request for controller_issues_bulk_edit_after_save hookhttps://www.redmine.org/issues/5714?journal_id=190522010-08-06T09:25:41ZHolger Just
<ul></ul><p>Then hook yourself into <code>Journal.after_save</code>. You can filter for issue journals there. Be aware that the whole journal stuff is currently undergoing changes. So don't trust that you will only have journal entries of issues.</p>
<p>Also, the current journal of an issue can be retrieved using <code>@issue.current_journal</code>.</p> Redmine - Patch #5714: Request for controller_issues_bulk_edit_after_save hookhttps://www.redmine.org/issues/5714?journal_id=190532010-08-06T09:28:29ZAndriy Lesyuk
<ul></ul><p><code>Journal.after_save</code> is also called <ins>before</ins> the journal is actually added...</p> Redmine - Patch #5714: Request for controller_issues_bulk_edit_after_save hookhttps://www.redmine.org/issues/5714?journal_id=190642010-08-06T11:36:13ZHolger Just
<ul></ul><p>Well, no.</p>
<p><code>Journal#save</code> is currently only called in <code>Issue#create_journal</code>, which is called as an after_save hook of <code>Issue</code>. Thus, once the journal is saved, its respective issue was already saved to the DB. Methods registered to the <code>Journal#after_save</code> hook are only called once the Journal object was correctly saved to the database.</p>
<p>Depending on the transaction isolation level of your database, you will not see the journal entry from another transaction before the first one is actually committed though. This will only happen after the request was successfully completed.</p> Redmine - Patch #5714: Request for controller_issues_bulk_edit_after_save hookhttps://www.redmine.org/issues/5714?journal_id=196592010-08-24T14:47:40ZAndriy Lesyuk
<ul><li><strong>File</strong> <a href="/attachments/4356">controller_issues_bulk_edit_after_save.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/4356/controller_issues_bulk_edit_after_save.patch">controller_issues_bulk_edit_after_save.patch</a> added</li></ul><p>Anyway my patch works... Without it I had troubles...</p>
<p>Redmine's code contains other hooks in pairs - [before|after]_save. So I believe it is logical to add controller_issues_bulk_edit_before_save. And it is very easy to add this hook - just by applying this path. Can I expect this to be done? Otherwise I will need to patch Redmine's code on every upgrade. Please...</p>
<p>Thanks</p> Redmine - Patch #5714: Request for controller_issues_bulk_edit_after_save hookhttps://www.redmine.org/issues/5714?journal_id=227372010-11-26T23:40:06ZEric Davis
<ul><li><strong>Assignee</strong> deleted (<del><i>Eric Davis</i></del>)</li></ul><p>I am stepping down from working on Redmine. If someone else is interesting in working on this issue, feel free to reassign it to them.</p>
<p>Eric Davis</p> Redmine - Patch #5714: Request for controller_issues_bulk_edit_after_save hookhttps://www.redmine.org/issues/5714?journal_id=269332011-03-23T22:20:26ZAndriy Lesyuk
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Resolved</i></li></ul><p>I don't need applying this patch any more... So do whatever you want with it.</p> Redmine - Patch #5714: Request for controller_issues_bulk_edit_after_save hookhttps://www.redmine.org/issues/5714?journal_id=444502013-01-15T21:30:30ZJan Niggemann (redmine.org team member)jan.niggemann@redmine.org
<ul></ul><p>Closing this, status is resolved since 400 days and more (issue was last updated more than 400 days ago)...</p> Redmine - Patch #5714: Request for controller_issues_bulk_edit_after_save hookhttps://www.redmine.org/issues/5714?journal_id=444752013-01-15T21:37:12ZJan Niggemann (redmine.org team member)jan.niggemann@redmine.org
<ul><li><strong>Status</strong> changed from <i>Resolved</i> to <i>Closed</i></li></ul> Redmine - Patch #5714: Request for controller_issues_bulk_edit_after_save hookhttps://www.redmine.org/issues/5714?journal_id=882372018-11-03T21:33:35ZGo MAEDA
<ul><li><strong>Is duplicate of</strong> <i><a class="issue tracker-3 status-1 priority-4 priority-default" href="/issues/8757">Patch #8757</a>: Add hook for bulk edit post-save state</i> added</li></ul>