Comments

juliangb’s picture

Project: Storm » Drupal PM (Project Management)
Component: Storm Expenses » Code

Moving to the new Project Management project.

juliangb’s picture

Assigned: Unassigned » juliangb

I'm working on this, and have pushed a partial fix into 7.x-1.x, where the form appears.

The provider autocomplete now works, but the hierarchical selects do not, and I don't expect the node to save if submitted.

You can test this at http://drupal-7.project-management-module.org/node/add/pmexpense .

dbt102’s picture

I tried testing this as suggested in #2 at http://drupal-7.project-management-module.org/node/add/pmexpense .

When I try to Add (+) an expense from the dashboard I get an ACCESS DENIED message, even though I'm logged into the site. Looks like the permissions set won't allow for testing.

Also, if I just click on the Expenses icon in the dashboard it takes me to a whitescreen, and then just sits there looking very white.

I assume this is still being worked on, but wanted to log the testing effort...

juliangb’s picture

Watch this space and i'll post again when it is ready to test.

Some of our recent changes have tightened up access controls - and we need to make some more changes to allow the access again.

Raphael Dürst’s picture

Status: Needs review » Active
StatusFileSize
new35.35 KB

I wanted to fix the issue #695976: Add billable/billed flags to expenses and I realized, without fixing this first, this is not possible.

So I fixed (hopefully) both issues.

With this patch, it is possible to save and update expenses and the hierarchical selects are working as well.
Expenses have now the billed and billable fields too.

Raphael Dürst’s picture

Status: Active » Needs review
juliangb’s picture

Assigned: juliangb » Unassigned
Status: Active » Needs review

Hi Raphael,

Would you mind posting these as separate patches please? I realise that its probably frustrating to do some from a development perspective (as you're working on both at once), but it means that we won't be trying to review a change for the port, and a new feature all at once.

On the new feature, we need to discuss whether to put this in at this stage, using the old methodology for items like a list page etc, fields api etc.

My personal opinion is that at this stage, we should focus more on getting the existing working before adding features that we'll then have to change.

Thoughts?

dbt102’s picture

Patch applied cleanly. When clicking on Dashboard - Expenses i get the following error...

Fatal error: Call to undefined function db_rewrite_sql() in /media/sf_sandbox/pm/sites/all/modules/pm/pmexpense/pmexpense.admin.inc on line 171

Raphael Dürst’s picture

Status: Needs review » Needs work

Yes, I know. This is still the old expense list function, I didn't change anything on this, since we want to want to make views for all listings.

But adding and viewing the expenses should work.

I will make a patch with only the fixes for this issue and post the patch for the billed/billable fields in the other issue. I think we should discuss there, if we want to implement this feature at this stage.

Raphael Dürst’s picture

Status: Needs work » Needs review
StatusFileSize
new25.54 KB

Ok, this patch fixes only the expense form fields and save/update functions.

Everything which concerns the billed/billable fields is not longer in this patch.

dbt102’s picture

StatusFileSize
new144.72 KB
new91.2 KB

Patch applied cleanly.

Ran update.php and it threw an error (see attached 'expense_update.png' ), then with continue update completed ok.

Tried to create new expense. The add expense form displayed ok. Org, Proj, Task & Ticket drop down worked well.

When saved expense page full or errors displayed (see attached 'expense_add.png'))

Raphael Dürst’s picture

Thanks for the review!

Since we won't use the list functions anymore, I'll just ignore the first error. We will delete this functions anyway.

The second error happens, if you leave the field amount empty. I fixed it with this patch.

dbt102’s picture

StatusFileSize
new108.07 KB

Patch applied cleanly.

Could create new expense ok.

It seemed to save OK, but some errors showed up. Not sure if its related to this patch, but reporting it since it was there.

Thanks for your programming efforts!

Raphael Dürst’s picture

Seems I forgot something.

Fixed it with this patch.

Again, thanks for reviewing.

dbt102’s picture

StatusFileSize
new73.7 KB

Looking better. Still a few Notices show up, don't know how relevant they are to this patch, just reporting them. See attached.

Raphael Dürst’s picture

Now this should be finally fixed too.
I didn't have pminvoice enabled, that's why I didn't notice these errors.

dbt102’s picture

Status: Needs review » Reviewed & tested by the community

Patch applied cleanly. Looks like all form fields are working Ok and don't see any errors.

juliangb’s picture

Status: Reviewed & tested by the community » Fixed

I've committed this - thanks for providing the patch and testing!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit 7f3c003 on 7.x-1.x, 7.x-2.x by juliangb:
    Issue #1849014 by juliangb: Fix expenses form fields.
    
  • Commit 1f952e4 on 7.x-1.x, 7.x-2.x by juliangb:
    Issue #1849014 by juliangb: Fix expenses form fields.
    
  • Commit 84ec295 on 7.x-1.x, 7.x-2.x authored by Raphael Dürst, committed by juliangb:
    Issue #1849014 by Raphael Durst | juliangb: Fix expenses form fields.