This project is used for allowing administrator to allow certain roles to change Ubercart orders workflow only to workflow that that role has permission for.

This is useful when you are running a store, powered by Ubercart and you have certain users that handle the orders. For example if a group "shipping" only has to put orders in "Processing" or "Shipped" but not in "Complete" or "Payment Received". If you have a client relationship department, that department can put order in state "Shipped to Client" for example or "Canceled" but not "Shipped".
I'm running a site powered by drupal and with this module i can track my payments directly from drupal because I know for sure that my employees can't put the order in "Payment Recieved" or "Completed", just I can do that.

There is no similar project to do this.

This is my first public project in drupal but I'm working with drupal for more than 3 years now. This is a simple project but i have some new features in mind like users can view only orders in workflows allowed by administrator not all orders like it does now or view order by custom timeline (ex: last 30 days).

My project is located at: http://drupal.org/sandbox/fiftyz/1168680

Comments

jordojuice’s picture

Good idea! I could definitely see this being very helpful!

jordojuice’s picture

Component: other » module
Assigned: Unassigned » jordojuice
jordojuice’s picture

Assigned: jordojuice » Unassigned
Status: Needs review » Needs work

Okay, so...
1. What version is this for? Your .info file has no information other than what was added by git when the repository was set up, so this module can't even be used right now.
-Needs version information
-Description
-Probably package
-Dependencies (UC and related modules)

2. No @file in .module

3. Functions need documentation. Please review the standard on code documentation and format appropriately.

4. Not correct:

//		if(is_array($new_statuses) && count($new_statuses)) {
//			$new_statuses[$form['controls']['status']['#default_value']] = $form_statuses[$form['controls']['status']['#default_value']];
			$form['controls']['status']['#options'] = $new_statuses;

5. Use tabs not spaces. Run the code through the Coder module (http://drupal.org/project/coder) on 'minor (most)' as you have a lot of problems with spacing, commenting, and operations.

6. Needs a README.txt file with instructions.

SilviuChingaru’s picture

First of all thank you for your time and support.

Solved all this problem.

  • .info file updated
  • README.txt added.
  • functions documented.
  • tabs removed
  • @file in .module added

Coder Module output:

No Problems Found

I hope now is ok.

SilviuChingaru’s picture

Status: Needs work » Fixed
jordojuice’s picture

Status: Fixed » Needs review

Awesome! I don't have time to check it out again tonight but I'll probably get back to it tomorrow.

SilviuChingaru’s picture

Great! I'll wait for your review.

SilviuChingaru’s picture

I'm still waiting for the review...
PING

jordojuice’s picture

Assigned: Unassigned » jordojuice

Youre so right! I totally missed this! Sorry. I will do a code review again now and see if there is anything else I may have missed. Once that is done and you fix anything that needs fixing, you can set it back to needs review and will have to wait for more experienced reviewers or a git administrator to come along. Generally, many of these applications are taking up to two months. These reviews are done by volunteers in their spare time, so be patient if nobody else gets to this for a while after me.

jordojuice’s picture

Status: Needs review » Needs work

Okay:
- You can remove // $Id$ and similar tags. As of git Drupal does not use them any more.

- Your files should have a blank line at the end of them.

if (user_access('change orders to '. $form_title)) $new_statuses[$form_id] = $form_title;
- I believe according to coding standards your if statements need to use brackets.

$perms[] = 'change orders to '. $status['title'];
- With string concatenation, operators should have a space on each side. So this should just be:
$perms[] = 'change orders to ' . $status['title'];
So, there are a few of those. Other than that I'm not noticing any other formatting issues. Your documentation is correct now, except one last thing is you should remove the space between hook_form_FORM_ID_alter() documentation block and the function. So:

/**
 * Implementation of hook_form_FORM_ID_alter().
 */
function uc_order_access_form_uc_order_view_update_form_alter(&$form, &$form_state) {

Sorry about the lagging! But I assure you it's not slowing down your review. This queue is way backed up!

jordojuice’s picture

Assigned: jordojuice » Unassigned
SilviuChingaru’s picture

Status: Needs work » Needs review

Everything is fixed now.

jordojuice’s picture

Great! Hopefully we can get someone with Ubercart experience to come along and check it out now.

SilviuChingaru’s picture

I hope so too... but I don't know how :-(

SilviuChingaru’s picture

Ping...

SilviuChingaru’s picture

Issue tags: +PAReview: Ubercart

Tagged for Ubercart developers review.

jordojuice’s picture

Hate to say but it will probably be a while again before this gets moving. Only been in the queue for six days, and many applications are taking two months. At least one. Sorry! Sure someone will come around though, just don't get too anxious!

SilviuChingaru’s picture

I'm not getting anxious, I'm just pinging the review team from time to time... ;-)
P.S.: By the way my module is quite simple at this moment so the review will take only few minutes - 10 min I think.

jordojuice’s picture

Indeed! However, from what I have heard from git administrators, they avoid prioritizing module application issues if possible. Everyone's application has the same priority. My own module application has been in the queue for a month, which is why I like to encourage patience. They are way backed up but they are working hard every day to ensure stability, security, and overall value in modules hosted on drupal.org. They won't forget about you.

Something I've recommended is applying your own knowledge to reviewing other project applications while you wait for your project to be reviewed. Providing constructive input to others whose projects are in the queue can help you hone your own skills and assist the project reviewers by resolving coding and documentation standards compliance issues ahead of time, thus reducing the months long backlog. I'm not an official part of any review team, I just try to help get projects prepared for them by fixing minor coding issues, which I like to think helps. I have definitely learned a lot trolling the project applications queue these last few weeks. Plus it kills time!

tr’s picture

Status: Needs review » Needs work

Which branch do you want reviewed? I see 6.x-1.x-cleanup, 6.x-1.x, 7.x-1.x, master, and test1.

A D7 version of this module is probably not needed and would certainly be radically different because orders are entity types in Ubercart for Drupal 7 and the order summary tables are Views.

Because you're overriding so many menu items, this module is going to be impossible to maintain - every time Ubercart core fixes a bug or adds a feature in one of those menu callbacks you're going to have to make the same change in your code. Likewise, because you're overriding menu items, you need to ensure your module gets loaded after all the Ubercart modules. This should be done in the hook_install() by setting the module weight.

This module is also incompatible with other contributed modules that alter those same menu paths. uc_tracking and uc_reorder are the two I know about.

It might be much easier and more effective to propose a patch to Ubercart that lets you hook into the permissions callbacks, that way you wouldn't have to re-write every function that used the permissions callbacks.

I glanced at the 6.x-1.x-cleanup an 6.x-1.x branches and they both need coding standards cleanup still. I saw trailing spaces, missing or improper doxygen comments (/* */ instead of /** */, "Implementation of" needs to be "Implements", verb tense, etc.).

klausi’s picture

Status: Needs work » Closed (won't fix)

No activity in several months. Reopen and set the status to "needs review" if you are still pursuing this application.

SilviuChingaru’s picture

Status: Closed (won't fix) » Needs review

All code for branch 7.x-1.x was re-factored. With Drupal 8 knocking at the door I no longer intend to support a 6.x version of this module.

The code was partially tested on production and it worked fine (at least as I saw).

Waiting for your review.

PA robot’s picture

Multiple Applications
It appears that there have been multiple project applications opened under your username:

Project 1: http://drupal.org/node/1168714

Project 2: http://drupal.org/node/1910254

As successful completion of the project application process results in the applicant being granted the 'Create Full Projects' permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue. With this in mind, your secondary applications have been marked as 'closed(duplicate)', with only one application left open (chosen at random).

If you prefer that we proceed through this review process with a different application than the one which was left open, then feel free to close the 'open' application as a duplicate, and re-open one of the project applications which had been closed.

I'm a robot and this is an automated message from Project Applications Scraper.

PA robot’s picture

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

kscheirer’s picture

Status: Needs review » Reviewed & tested by the community

You have a number of typos in your README.txt file. Your indenting in uc_order_access.module is off - should always be 2 spaces, especially with functions that are more than 1 line.

No major issues found, marking RTBC.

SilviuChingaru’s picture

Thank you very much for your review. There are still some things I need to do before 7.x-1.0 release like renewing permissions on status rename and maybe on delete.

Waiting for full project approval... :-)

mlncn’s picture

Status: Reviewed & tested by the community » Fixed

Thank you jordojuice, TR, and kscheirer for the reviews.

Code in the current master branch looks OK and well-commented to me.

Congratulations, fiftyz, on joining the ranks of vetted Git users, the project maintainers!

The Git instruction tab on your project is one of your new best friends, and please address issues in the project queue as they come up. Thanks for your contribution!

SilviuChingaru’s picture

Thank you all also for reviewing my project. I'll try to review some also when I have a little time.

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