Closed (fixed)
Project:
Project
Version:
x.y.z
Component:
Projects
Priority:
Critical
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
11 Oct 2005 at 14:02 UTC
Updated:
22 Nov 2005 at 18:00 UTC
Jump to comment: Most recent file
This is a big task for this module, and I guess its a must as project module forms no longer display or function under the current HEAD release. Is anyone planning on working on this? I'll try and help out where I can, but some of the forms look rather complex!
Note that introducing the Form API changes will effects some active patches, notably http://drupal.org/node/32737 and http://drupal.org/node/25362
I've assigned this to the Projects component, although it applies to: project.module, issue.inc, release.inc, project.inc and comment.inc.
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | project_formapi_changes_r4.patch | 21.5 KB | pfaocle |
| #10 | project_formapi_changes_r3.patch | 14.92 KB | pfaocle |
| #8 | issue.inc_formapi_changes_step1.patch | 5.54 KB | pfaocle |
| #6 | project_settings_page_formapi_r2.patch | 4.62 KB | pfaocle |
| #5 | project_settings_page_formapi.patch | 4.35 KB | pfaocle |
Comments
Comment #1
moggy commentedI've been practicing on simpler modules. Haven't touched project yet.
It's a bit of a bastard of a change. I hope it makes someone's life easier :s
Comment #2
pfaocleSame here, its seems OK although I have had problems with checkboxes. Will take a look over some of the project module files now - it is a required change, isn't it?
Comment #3
moggy commentedlooks like it. there doesn't seem to be any legacy support for it, infact it looks like there isn't going to be any legacy support period.
so, you're going to do this then leafish?
Comment #4
pfaocleWell, I've had a look, and its a darn sight more complex than some of the simple modules I've had a go at updating so far, and I'm still having some trouble with those!
Keep an eye out for patches, tho. I may submit some if I'm feeling brave.
Comment #5
pfaocleFirst brick wall: checkboxes. Can anyone spot why the form checkbox in the attached patch doesn't work? Its either (a) defaulting to the result of variable_get('project_browse_releases', 1), ie 1, or (b) its not saving to the db properly.
I've checked through core modules, and this seems to be the correct syntax for checkboxes...
The next hurdle: form groups and collapsible groups. Anyone know how this is done with new Form API?
Cheers!
Comment #6
pfaocleAh, not to worry: have sussed form groups, or fieldsets. Revised patch attached for project.module only. Unfortunately, still have the problem with the checkbox.
(ps I've not made the form groups on this settings page collapsible, but its easy to do so. Replace:
$form['project_releases'] = array('#type' => 'fieldset', '#title' => t('Project Releases'));with:
$form['project_releases'] = array('#type' => 'fieldset', '#title' => t('Project Releases'), '#collapsible' => TRUE, '#collapsed' => FALSE);Comment #7
dreed47 commentedI'm having the same problem with checkboxes that you describe. I've got 2 on my form and they are coded identical. The first one saves correctly and the second one does not.
Comment #8
pfaocleAnother patch, this time for issue.inc's form hook. This is pretty much a straight-forward search & replace, except I've replaced the old CSS div classes ('standard', 'admin' and 'options' I think) that were used to separate sections of this form with form fieldsets. As a result, the CSS definitions for project module will need changing. The new forms have individual IDs, so that shouldn't be a problem.
One downside of this patch - the two page submission when creating issues no longer works. I'm unsure whether this was due to my changes or a bug present previously. As I said, these replacements are pretty simple. I've also resurrected an old issue on the usability of this 2-stage submission, with JS auto-complete as a possible solution. For now though, if anyone can test this patch and spot why this is not working, that will do us for now.
Apologies for the sporadic nature of these patches, I have limited time to work on this, and it is a whopping task, Please help out by testing my patches, and amending them as we go. Perhaps we'll get one big patch out of the other end.
Comment #9
moggy commentedproject_settings_page_formapi_r2.patch didn't apply cleanly.
Comment #10
pfaocleWas this because of this? Here's both those patches re-made against the new bunch of UNIX files. Can you test?
Comment #11
pfaocleAnother one with some minor changes. Signing off for the night, and I may not be around till next week. If someone wants to test this patch and keep hammering this?
Issues:
Hopefully the first three are just a result of my blurry eyes, and can be spotted by another pair.
Comment #12
pfaocleMarking this fixed... see:
* http://drupal.org/cvs?commit=20979
* http://drupal.org/cvs?commit=20986
* other commits listed at http://drupal.org/project/cvs/3281
Kudos and thank yous to hunmonk, webchick and all others involved! Cheers!
Comment #13
webchickThanks, Paul! Your code was a great help too! And I can't take too much credit, hunmonk did most of the hard work. :)
I'm changing this back to active though, as there are still a couple remaining bugs:
* When submitting a file attachment with an issue, the attachment is always renamed to "issues" (or issues_0, or issues_1, etc.)
* When submitting a file attachment with a follow-up to an issue, nothing is saved
If you or anyone else happens to have any insight as to why either of these are happening, it would be much appreciated! :)
Comment #14
webchick> * When submitting a file attachment with a follow-up to an issue, nothing is saved
By "nothing" I should clarify that I mean nothing about the file itself is not saved -- it doesn't get passed to the $FILES array. But all other things appear to save fine.
Comment #15
webchickIt now looks as if those two issues have been fixed! (thanks, hunmonk!!)
I am going to test one more time from a fresh HEAD install tomorrow after a good night's sleep and then I think we can mark this sucker "fixed" for good! :)
Comment #16
pfaocleOne more for you, I think:
* Go to the issues summary for a project
* Click 'submit' to add a new issue to the current project (.../node/add/project_issue/project_name)
* The current project project_name is not selected in the checkbox
* We then have to reselect the project, submit or preview, and get the warnings for missing required fields, and add in the rest of the fields for the new issue.
I'd guess this is a bug - the current project should already be selected (taken from the URL path), and the entire form for a new issue should be displayed immediately. I think the culprit is line ~312 of issue.inc:
$pid = $node->pid ? $node->pid : $_POST['edit']['pid'];Comment #17
hunmonk commentedok, committed a fix for that last bug. marking as fixed and crossing my fingers... :)
Comment #18
(not verified) commented