Closed (fixed)
Project:
Storm
Version:
6.x-1.x-dev
Component:
Storm Expenses
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
21 Sep 2010 at 22:31 UTC
Updated:
14 Feb 2011 at 23:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
rjgoldsborough commentedHere is a patch for an expense test. It doesn't quite pass yet, but I'm still working on it.
Comment #3
rjgoldsborough commentedAnother try. Will still fail at the end. Still not sure why but figured a few more sets of eyes couldn't hurt.
***EDIT***
Odd, I don't get those two exceptions locally
Comment #5
juliangb commentedThis should be done like this so that on the node add form (where the $node variable is not yet fully populated) the field still shows up properly.
Also, one of the exceptions seems to imply calling a function from the (not enabled) storm ticket module. Is stormticket a dependency of stormexpense? If so, it needs including in the test, if not, there is a bug in stormexpense.
Powered by Dreditor.
Comment #6
rjgoldsborough commentedThis patch fixes the above mentioned point and fixes all the fails/exceptions.
Comment #7
rjgoldsborough commentedIgnore that. Had extra junk in the patch.
Comment #8
juliangb commentedThanks for the update. A couple more comments.
It is not impossible to think of a situation where project_nid is not set, but we still want to set a task. Consider the node add form.
Therefore, we can't have the entire form item inside the if, it needs to be more specific.
Trailing whitespace behind all of these lines.
(Not introduced by this patch, but is something that could do with fixing)
I think for the functions within ..._beforesave, we should use the
... ? ... : ...syntax in order that we have explicitly set each part of $node.Powered by Dreditor.
Comment #9
juliangb commentedAlso, copy and paste error!
Powered by Dreditor.
Comment #10
rjgoldsborough commentedI don't think I'll have time tonight to work anymore on this and maybe not tomorrow as I have a flight, but we'll see. Anyway I did want to respond.
Pertaining to:
I completely agree, and think it's a bad idea. I think I meant to go back to this on both patches and forgot :p. My only reason for doing it was that if $project->nid wasn't set then eventually down the line, that form array would throw an exception too as $tasks wouldn't be defined. But I can just do a ternary if there similar to #default_value.
And I'll fix those whitespaces. I had noticed a few in other places as well.
Comment #11
juliangb commentedPatch for review.
Comment #13
juliangb commentedComment #14
juliangb commentedI don't seem to be improving things here...
Comment #15
rjgoldsborough commentedHere's an updated patch. I think this one should do. Previous comments taken into account.
Comment #17
rjgoldsborough commentedMalformed patch. This one should apply.
Comment #18
rjgoldsborough commentedDoh
Comment #19
juliangb commentedLooks good, thanks.
Comment #20
juliangb commentedCommitted to 2.x.
Testing on 1.x.
Comment #21
juliangb commented#17: storm_expense_simple_test.patch queued for re-testing.
Comment #22
juliangb commentedCommitted to 1.x.