Closed (fixed)
Project:
Project issue tracking
Version:
5.x-2.x-dev
Component:
Issues
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
11 Nov 2007 at 15:26 UTC
Updated:
27 Nov 2007 at 22:41 UTC
Jump to comment: Most recent file
Comments
Comment #1
hunmonk commentedwhoop. i don't know how i missed it, but i forget to re-implement this for IFAC :/
unfortunately, we again run into limitations of comment module. drupal.org (and a lot of other sites) don't allow anon users to post comments w/o approval, and this cron based job runs as anon :(
it looked messy and potentially dangerous to be running cron as another user, so i've instead elected to roll custom code for inserting the comments. i don't like to do it, but i think that's our best bet for now. i stole as little code as possible from comment_save() to make this work.
attached has been tested, and seems to work perfectly.
we should probably get this reviewed and committed ASAP, so we don't have a pileup on d.o.
Comment #2
dwwThat's a very good start. I'll resist the urge to feature creep this, since there are a lot of problems with the current functionality that I'd like to address, but I agree, the first step is to get it working the same as it used to before IFAC. So, a few minor complaints with this patch:
A) "cron" isn't very friendly for user-facing text. How about "Automatically closed after being fixed for 2 weeks." or something?
B) I know I just said I don't want to feature creep it, but maybe a theme function for the exact text being used? I'd hate to tell people to localize their site just to translate this if they wanted to alter it without hacking the code. Definitely not a show-stopper, but if we're going to change the line anyway...
C) I don't understand the code block for // Build vancode. I thought we always made project_issue comments unthreaded? Why do we care for this one?
D) Any reason to "unroll" this loop like you have it:
instead of leaving it more like it used to be:
??
Otherwise, looks good to me. I haven't tested it, but it seems like it should work. ;)
Thanks!
Comment #3
hunmonk commentedA) sure we can change it, but not to what you suggested :P
B) easy enough
C) it's the same as comment_save() uses, and we'll be using comment_save() again in D7, so it's consistent
D) some of the vars are another layer deep b/c of namespace issues. there aren't that many vars, and i find the way it's done a bit more readable overall.
so we need a better default val for A)...
Comment #4
hunmonk commentedattached corrects A) and B) -- C) and D) are fine as is.
Comment #5
dwwSorry I didn't mention this before (since I scared myself away from feature creeping), but this line:
$comment['sid'] = 7;could use something like this:
Otherwise, this is RTBC.
Thanks!
-Derek
Comment #6
hunmonk commentedadded the above comment, committed to HEAD, installed on drupal.org
Comment #7
wim leersYay, it works again! :) Thanks guys!
Comment #8
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.