View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0008088 | mantisbt | other | public | 2007-06-20 20:32 | 2014-07-19 04:43 |
Reporter | harako | Assigned To | dregad | ||
Priority | normal | Severity | feature | Reproducibility | always |
Status | closed | Resolution | duplicate | ||
Product Version | 1.1.0a3 | ||||
Summary | 0008088: Data is overwritten by another data when two persons are editing a same issue. | ||||
Description | I know it's a typical behaviour of web system. I think however, I would appreciate it if the following behaviour is implemented as option.
| ||||
Steps To Reproduce |
| ||||
Tags | No tags attached. | ||||
Attached Files | |||||
In fact, there's a pretty simple solution that can be implemented:
FileMaker Pro has this (it's called the mod_id there). Wikipedia and probably other wiki systems have this. It's a good idea. |
|
Another solution: Using the mantis_tokens_table or similar table, add a type for TOKEN_ISSUE_LOCK. Then when a user goes into the bug update form, add a row to the table with the 'timestamp' being when they started editing, the 'expiry' set to when their exclusive update rights end, and 'value' set to the issue id. If second user attempts to go into the bug update form for an issue already "locked", they will get a message stating who is already updating that issue. If the first user never completes the update before the "expiry" time, the second user is allowed to update the issue and the first user will then have to re-submit their changes. This would be accomplished by the second user's update removing the first user's token when their token is added to the token table. The 'expiry' value should be calculated from something defined in the config_defaults_inc.php file as 30 min. or 1 hour. that way it is configurable. |
|
I'm aware of this issue and the method I had in mind for fixing it is what ryandesign suggested with "last modified" field as the token. Last modified is currently updated when an issue is updated or its related data like notes are changed. Although this may cause more conflict than what is abosuletely necessary, I don't think the conflict will happen often enough to justify an extra field. There is also a benefit from disallowing two users to add notes in parallel, is that the 2nd user should ideally take the note of the first user in consideration before submitting their notes. So adding notes / updating issue header information / and potentionally other operations can all be guarded by the issue last modified timestamp. |
|
My suggestion helps to resolve conflict between two users working on the same issue while minimizing users having to re-enter their work, and lets the second user know someone is already working on the issue. The only additional field would be for the timeout value, and could just be hard-coded if necessary. |
|
I had the same problem in my team.
Additionaly you need 2 new rows in mantis_bug_table: That's all. Maybe this patch will appear in next mantis release ;-) |
|
additional functions for bug_api.php:
/**
|
|