プロジェクト

全般

プロフィール

Vote #64819

完了

Warning on leaving edited issue/wiki page without saving

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

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

0%

予定工数:
category_id:
10
version_id:
27
issue_org_id:
2910
author_id:
4267
assigned_to_id:
0
comments:
22
status_id:
5
tracker_id:
2
plus1:
3
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

I had already few times situations while posting quite large issues in redmine, i accidentally push something, go back or forward, or close tab and so i loose all my information, that i has been entering for let's say quite a long time and this situation is very upseting!!!

There is one solution right now, but it isn't good: Save issue time to time, BUT user that i had assigned to already got mail with issue content at my first save and if user doesn't come to redmine and starts developing by email content, this issue can be incomplete yet.

So one of two solutions would be great feature:

1) Javascript alert on leaving page if issue form has been changed or any data has been entered or change (This can be easily done by binding form.onchange property and on page unload check if form has been changed...)

2) Add new Status: "Draft" where nothing happens when user saves issue with this Status - no emails sent. Or maybe this can be handled in some other way. "Draft" checkbox, etc...

Maybe there are other solutions than i have missed. If there are any, let me know. Thanks.


journals

Hi,

both proposals seem reasonable to me.

For drafts, some models could act_as_draftable (issue, wikipage, ...?). This would allow to set a draft flag to true. Models set as "Draft" would not be accessible to other users. However, they could be listed and accessed by the author, maybe via the author "my page".

For JS, it is quiet common to see this type of alert on web applications, I think this can also do the job and is simpler. My vote goes for this one because it does the job and is not too intrusive into redmine existing code.
--------------------------------------------------------------------------------
I wrote a small piece of javascript like in #2981 proposed, because some people urgently needed it in our company ;-)

Added the following line to the header of app/views/layouts/base.rhtml:

@<%= javascript_include_tag 'textsave' %>@

and the .js-file to public/javascripts/textsave.js

Perhaps anybody likes to test it?
--------------------------------------------------------------------------------
Added textsave.js to our redmine. So far it seems working fine. Thanks a lot! :)
Will let you know if there will be any problems in the future.
--------------------------------------------------------------------------------
Mathias Fischer wrote:
> I wrote a small piece of javascript like in #2981 proposed, because some people urgently needed it in our company ;-)

There is one bug actually. Try following action sequence:
# Choose "New Issue"
# Change Tracker to "Feature" or any other (which is not default)
# Input subject and descriprion.
# Push "Submit"
And after pushing SUBMIT warning alert shows, which shouldn't happen.

--------------------------------------------------------------------------------
Yes, I can reproduce this bug. Guess there is an event triggered when changing the tracker. Other forms with onsubmit/onchange-Events have problems too, like the stuff_to_do-Plugin. Perhaps I can find a workaround...
--------------------------------------------------------------------------------
The problem is the AJAX-Request on the site, so you would have to register the events again. But it is easier to put the following line in the initialize-function:

@document.observe('submit',this.setUnchanged.bind(this));@

But it does not work in IE6 :-(

And I would restrict the observedElements to textareas, because the selects have onchange-Events by themself.
--------------------------------------------------------------------------------
FWIW, I would like to see the draft option as well as a well implemented JS warning option. I would also like to see the draft option auto-save à la Gmail. That way, if your browser crashes, you hopefully have some of your work.

Personally, I think Gmail is a really good model for this type of thing.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
+1 for getting the javascript alert pushed into the core. It has been a common tragedy,
--------------------------------------------------------------------------------
I would like to second the option to have a (good) javascript alert.
--------------------------------------------------------------------------------
+1
This issue should be addressed as soon as possible, is not admissible users can loose all their work just this easy. Every week I get someone complaining about loosing their changes, and the only solution I can give them is... write everything outside Redmine first! This is extremely unproductive.

Also related, +every Submit should request a confirmation+... every now and then, everyone presses the wrong option by mistake, and there's way to correct it.
--------------------------------------------------------------------------------
Paulo Santos wrote:
> +1
> This issue should be addressed as soon as possible, is not admissible users can loose all their work just this easy. Every week I get someone complaining about loosing their changes, and the only solution I can give them is... write everything outside Redmine first! This is extremely unproductive.

I also used to say that to my users before I found this post. There is a script attached right here on this issue which prevents losing data, maybe you should try it. I admit it has side-effects, sometimes it is triggered while it should not (on Issues page when you have a filter for instance). But I'm nearly 100% happy with it for 6 months, and my users too ;-)

> Also related, +every Submit should request a confirmation+... every now and then, everyone presses the wrong option by mistake, and there's way to correct it.

I disagree, there IS a way to correct it :
# it's not too complicated modifying your message after it has been published. OK the notifications were already sent, but you can edit it with "more" button or with the pen on the side of each comment
# I think it would be complicated to implement something "a-la-gmail" to allow people to stop sending an issue/comment X seconds after they pressed Enter key or pushed the button...

Anyway, I totally agree Randy's comment : I think Gmail is a really good model for this problem. I started implementing an autosave functionality as a plugin. I don't consider it as stable, but you can find it "at github":http://github.com/jbbarth/redmine_drafts and try it if you want. I would be happy to have feedback or contributions on it. As I really need this functionality before may 2010, it will be released as stable before this date, maybe with the 2 functionalities (autosave + javascript).
--------------------------------------------------------------------------------

The "Request confirmation on Submit" feature, is more like a simple popup message requesting "Are you sure you want to submit this?"... for flexibility, this feature could be an option in Project/Redmine settings, not a mandatory behavior.

As for the _hack_, I'll may give it a try... but I'm not comfortable making surgical changes to a SW installation, I would rather have a Redmine release with a final solution... otherwise I may end up needing a personalized Redmine repository to manage this _small improvements_ B-)
--------------------------------------------------------------------------------
I prefer the idea of a lightweigt JS solution over the heavier drafts implementation. I think this feature would add a lot of usability for many users and increase the acceptance of web-based software.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
+1 The two options are very useful.

--------------------------------------------------------------------------------
I believe that #7066 can be a good implementation too.
--------------------------------------------------------------------------------
I just realized that #2698 suggest auto save being minor-revisions, can be one option too IMHO.
--------------------------------------------------------------------------------
Feature added in r4900 base on Mathias' javascript implementation.
Only textareas are monitored and the warning can be turned off in user's preference.
--------------------------------------------------------------------------------
This feature does not work when using CKEditor text formatter.
--------------------------------------------------------------------------------
salman mp wrote:
> This feature does not work when using CKEditor text formatter.

The CKEditor is a plugin to redmine, afaik. I believe, the CKEditor changes the textarea and would have to implement the feature by itself. I would suggest to look here for an answer: https://github.com/a-ono/redmine_ckeditor/issues
--------------------------------------------------------------------------------


related_issues

relates,Closed,1852,Use regular POST (non-ajax) for wiki preview
relates,Closed,9845,Changes to Wiki content are lost when using Back button
duplicates,Closed,2981,Prevent from leaving the page when in edit mode for issue, wiki or other
duplicates,Closed,3298,When updating an issue, clicking a link destroys all my input
duplicates,Closed,4396,Ask user to confim exiting unsaved wiki page
duplicates,Closed,810,Warning when navigating away from editing a form
duplicates,Closed,1888,Wiki saving
duplicates,Closed,6043,Prevent from leaving unsaved "New Issue" page.
duplicates,Closed,1250,Ask confirmation on PageLeave in wiki

Admin Redmine さんがほぼ2年前に更新

  • カテゴリUI_10 にセット
  • 対象バージョン1.2.0_27 にセット

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

いいね!0
いいね!0