Closed (fixed)
Project:
Storm
Version:
7.x-1.x-dev
Component:
Storm Person
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
22 Oct 2012 at 21:31 UTC
Updated:
7 Nov 2012 at 20:40 UTC
Jump to comment: Most recent file
This is handled by Organization being a mandatory field on the stormperson form.
We should do a quick check in stormperson_form() for the existence of organizations, and throw an appropriate error if there are none found.
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | storm-1820170-organization_checks-13.patch | 731 bytes | willwh |
| #11 | storm-1820170-organization-checks-11.patch | 733 bytes | willwh |
| #9 | storm-1820170-organization-checks-9.patch | 739 bytes | willwh |
| #6 | storm-1820170-organization_checks-4.patch | 738 bytes | willwh |
| #3 | storm-1820170-organization_check-3.patch | 1.05 KB | willwh |
Comments
Comment #1
willwh commentedThe actual error thrown here could probably use some tidy up.
If you want to test this patch - make sure you start with a fresh storm install (i.e. run 'drush stre' or 'drush storm-reinstall' - or do this manually, disable > uninstall > renable all modules.)
Comment #2
juliangb commentedNot sure why the indentation has changed for this bit?
We should start the if on a new line, and also add a blank line before the org_nid field just to aid readability.
!count($orgs) > 0 sounds like a double negative. How about if(empty($orgs))?
For the message, sounds on the right lines, but I'd add "before you can add a Person", for some extra clarity.
Comment #3
willwh commentedLike so? :)
Comment #4
juliangb commentedI know it's splitting hairs, but still a bit confused as to why the indentation has changed...
Comment #5
juliangb commentedDidn't mean to change status (dreditor does it automatically)... since we are just talking about alignment rather than functionality ;)
Comment #6
willwh commentedOkay........ like so? :)
Comment #8
juliangb commentedWe've lost a closing bracket.
Comment #9
willwh commentedHere we go :)
Comment #10
willwh commentedComment #11
willwh commentedLet's try this for readability.
Comment #12
juliangb commentedFinal thing (was double checking the patch applies well), is we should remove the brackets around !link. The message looks a bit odd otherwise.
Comment #13
willwh commentedRoger that!
Comment #14
juliangb commentedCommitted, thanks.