Opened 15 years ago
Closed 15 years ago
#7048 closed enhancement (fixed)
[PATCH] Add the ability to *not* modify ticket changetime field
Reported by: | Dalton Barreto | Owned by: | CuriousCurmudgeon |
---|---|---|---|
Priority: | normal | Component: | BatchModifyPlugin |
Severity: | normal | Keywords: | |
Cc: | Lianyungang, Dalton Barreto, CuriousCurmudgeon | Trac Release: | 0.11 |
Description
Hi,
I'm attaching here a patch that adds the ability to perform batch modifications without changing ticket's changetime field.
The motivation to this is the use of BatchModifyPlugin along with TracUnreadPlugin.
TracUnreadPlugin compares ticket's changetime with a last visit timestamp (that the plugin updates on every visit to the ticket) to know if a user has any unread comment.
But sometime there are changes that do not need to apear on everybody Recent changes report.
Could you please review the patch and apply, if appropriate?
Thanks,
Attachments (1)
Change History (18)
Changed 15 years ago by
Attachment: | donot-modify-ticket-changetime.patch added |
---|
comment:2 follow-up: 3 Changed 15 years ago by
Cc: | Lianyungang added; Dalton Barreto removed |
---|
Keep posting stuff like this i really like it
comment:3 Changed 15 years ago by
Cc: | Dalton Barreto CuriousCurmudgeon added |
---|
Replying to cna training:
Keep posting stuff like this i really like it
Thanks, I hope this gets commited. Let's see.
comment:4 follow-up: 7 Changed 15 years ago by
- Applied patch from daltonmatos with some cosmetic changes to keep with the style of the rest of the plugin.
comment:5 Changed 15 years ago by
Status: | new → assigned |
---|
comment:6 Changed 15 years ago by
Patch has been applied. Some testing would be appreciated from those that have time.
comment:7 Changed 15 years ago by
Replying to CuriousCurmudgeon:
- Applied patch from daltonmatos with some cosmetic changes to keep with the style of the rest of the plugin.
Thanks! I'll update my Trac instance very soon.
comment:8 Changed 15 years ago by
Thinking about this implementation, since will possible to make modifications that no other user will see, would be a good idea to create a new Trac permisison? This way normal users would still be able do make batch modifications, but this modifications will always be visible to others.
What do you think?
comment:9 Changed 15 years ago by
comment:10 Changed 15 years ago by
The modified date is being set to 40 years ago if you choose not to modify the changetime. I think it has to do with microsecond vs second timestamps.
comment:11 follow-up: 12 Changed 15 years ago by
comment:12 Changed 15 years ago by
Replying to CuriousCurmudgeon:
- Fixed changetime bug. Need to call to_utimestamp instead of to_timestamp. Trac stores timestamps in posix microseconds.
- Bumped the version number to 0.5.0
Hi, Trac stores timestamps in microseconds only in version 0.12. see: http://trac.edgewall.org/wiki/TracDev/ApiChanges/0.12#Timestampstorageindatabase
0.11 still uses seconds resolution. So BatchModifyPlugin 0.5.0 ([7940]) does not work with Trac 0.11:
From the logs:
2010-05-13 08:26:07,397 Trac[loader] ERROR: Skipping "batchmod.web_ui = batchmod.web_ui": (can't import "ImportError: cannot import name to_utimestamp")
Please revert to [7939]. Actually [7940] is the patch necessary to make BatchModifyPlugin compatible with the new 0.12 Trac. =)
comment:13 Changed 15 years ago by
The above comment is correct. I forgot about this change and was testing locally against the Trac trunk. I will revert the change and possibly create a 0.12 version of the plugin as well. This is the first difference between 0.11 and 0.12 that affects this plugin as far as I know.
comment:14 follow-up: 15 Changed 15 years ago by
- Merged r7940 back out. This change is only needed for Trac 0.12. See http://trac.edgewall.org/wiki/TracDev/ApiChanges/0.12#Timestampstorageindatabase
comment:15 Changed 15 years ago by
Replying to CuriousCurmudgeon:
Thaks, and that was me (comment:12), I just forgot to login first. =)
comment:16 Changed 15 years ago by
comment:17 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Closing as fixed. This is released with 0.5.0. Please reopen if any problems are found.
Add the ability do modify tickets without changing
changetime
field.