Closed (fixed)
Project:
Storm
Version:
6.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
3 Oct 2009 at 23:13 UTC
Updated:
10 Mar 2010 at 22:33 UTC
Jump to comment: Most recent file
Comments
Comment #1
nicoloconte commentedSubscribing, I need to add more fields similar to project manager and project assigned to for my work.
Nicolo'
Comment #2
Magnity commentedHi @nicoloconte, please add details about on which storm nodes you'd like the fields and the labels that you'd find useful!
Comment #3
nicoloconte commentedHi,
I made some changes in stormtask and stormticket modules, I created a new field "assigned to" like in stormproject module. Also I made a bug fix in stormticket module, the dateapi function wasn't declared.
Whare con I put this changes?
Nicolo'
Comment #4
Magnity commentedHi Nicolo,
If you ever find a bug in anything - have a look through the existing issues to see if it has been reported already, if it isn't, then create a new issue. It'd be even better too if you could post a patch with the changes you made to fix it.
Comment #5
hixster commentedsubscribing
Comment #6
Magnity commentedHi @hixster - if you want to mould where the additional fields are added, please add a comment!
Comment #7
bigjim commentedeven if it were something as simple as what is available in projects I would be psyched for that.
Comment #8
jurgenhaas+1 for having at least the ability for asigning tickets and tasks to team members.
Comment #9
hixster commentedSeconded, i got tasks assignments to team members working with CCK, but more crossover between users and project oriented tasks and tickets out of the box would be great.
Comment #10
Magnity commentedSeems like there is pretty good agreement as summarised well in #8.
A couple of bugs relating to the current 'assign to' fields need ironing out before these go in though:
- #628792: Project titles visible for non-assigned teams
- #622732: It's possible to create a task whose internal logic is not respected
Please have a look at these two if you want this issue to get through faster!
Then a big leap after this issue will be figuring out how to make the permissions hierarchical so solve a few quirks that these expose - such as being able to view a project without being able to view the organization etc.
#585104: Hierarchical permissions contains a bit on that.
Comment #11
gnuwings commentedSubscribing
Comment #12
Magnity commentedI get the impression that a few people are waiting for this...
Here is where we are at.
1 - The issues I've mentioned in #10 are fixed pending people finding problems
2 - Once we've had a day or so to test those, a 6.x-1.28 will be released.
3 - Then this issue will be done, meaning there will be a good amount of time to check for problems here before the release of 6.x-1.29.
Want to help out?
I'm keen to have more people running the development release. This way, we can more effectively test for errors before the stable releases are made. The best way is to run your production site on the stable release, but to use the development release on your staging site, or a copy of the production site.
Its really important to test the assigned to fields etc due to the access control properties of them.
Comment #13
gnuwings commented@Magnity:
Thanks for the great work. I am ready to test the beta code in my server. I assume the latest code is available here : http://drupal.org/node/253484
Comment #14
gnuwings commented@Magnity
I have tested the storm development version in drupal-6.14.
The project manager field is ideal for the projects module. However, it may be nice if the "Assigned to" field is moved to tasks and tickets. In our organisation, projects are never assigned instead we have project membership. The tasks and tickets are assigned to individual team or groups. I can provide more use cases if required.
Please note that I haven't tested the access control and permission system in storm.
Comment #15
nicoloconte commented#14 it's a great idea.
I implemented these features ("assigned to" for ticket and task) and also I implemented the possibility to send an email to the person assigned.
Comment #16
Magnity commentedThese fields have now been added to tasks and tickets - D6 development release from midnight tonight.
Needs adding to D7 branch.
Comment #17
gnuwings commented@Magnity
Great work and many thanks for the quick fix.
I have tested the latest version and did some basic testing. Here are the issues which I found:
1. The task/ticket view page doesn't show the name of the assigned user
2. The "Assigned To" field in tickets/tasks edit should list the members from the organization selected. Currently all the users in the system are listed in the "Assigned To" drop-down.
3. The tasks and tickets list should also show the assigned user
4. "Assigned To" field in projects may be removed(retain it only if somebody has a strong reason)
5. May be nice if the following permissions are added:
5.1 Storm Ticket : can assign ticket to any user
5.2 Storm Ticket : can assign tickets to self
5.3 Storm Task : can assign task to any user
5.4 Storm Task : can assign task to self
It may also be nice if you could explain the "PEOPLE" in the "Assigned To" drop-down. I didn't noticed any change when I assigned the task/ticket to "PEOPLE".
Comment #18
nicoloconte commentedGreat, thank you!
4) In my case is important to have the assigned to field for project.
Comment #19
jurgenhaasThanks @magnity, great work. I have immediately implemented the assign features into Storm Dashboard and this allows filtering for assignments on projects, tasks and tickets.
The latest development release also includes comment form alterations for tasks and tickets that allow the change of the status and the assignment of the task or the ticket.
While doing that I faced the problem mentioned in #17 item 2 above: what people should be displayed as possible assignments. Here is what I came up with:
1) If the project is assigned to a person, only that person is listed as an option
2) If the project is assigned to a teram, all team members are listed as options
3) If the project is not assigned to a person or a team, all people that are assigned to the same origanization as the task/ticket, are listed as options
4) In addition, if the project is assigned to a manager, that person is listed as well
After that I look into all teams and only those teams that exclusively contain members that are selected by step 1-4 above, will also be included as possible options.
That made the most sense to me and I hope it helps others as well. Comments of course welcome.
Comment #20
Magnity commentedThanks to all for posting these comments - I'll have a further look at getting past all of these later on tonight.
Comment #21
gnuwings commentedI too agree with the comments posted in #19, especially regarding the values of the "Assigned To" drop-down.
Comment #22
Magnity commented@all, if you do have particular things that you would like to see and have implemented it yourself, please do post the code (a patch preferably). This makes the process of development so much quicker.
Comment #23
Magnity commentedOK. I'll work through the points in turn, and hopefully won't miss anything:
#17:
1) Fixed via #663176: Field assigned_title doesn't get filled
2) (and #19) The criteria in #19 seems fairly logical, but a bit too restrictive in my opinion. For one, it'd need to be able to use the persons and teams from the host organization.
3) There is a problem with the list pages, in that everyone wants their own key fields to be on them, but I doubt that anyone would want all fields on it! For the D7 version, I am creating all of these pages through Views, and once this has been done will probably back port the views to D6. Then you can amend which fields are listed as much as you like...
4) (and #18). The assigned to field for projects will stay. I believe this field is fairly widely used.
5) I presume you'd want these permissions to do something as well as just be a checkbox on the user/perm page....! It would be a useful addition, but I doubt I will get this far at the moment unless I can steal some code from the dashboard project (haven't looked to see how @jurgenhaas has implemented it yet).
-PEOPLE- and -TEAMS- are simply separators so that you can see whether you're assigning to a person or a team. Perhaps i'll add some validation so that if those are selected a message appears explaining.
So I think the things to do will be the selection of who gets listed in the dropdown and the validation in case of selecting -PEOPLE-. Unfortunately I've run out of time tonight on this, so I'll try to have a look tomorrow.
As an aside though, I've fixed the styling on the node view.
Comment #24
jurgenhaas@Magnity, let me comment on your item 2) in #23: I thought too, that all members of the hosting organization should be available for selection but then I thought why should there be a finegrained assignment on a lower level - the project - if we get those people from the organization anyway. That wouldn't make sense.
Therefore, my code provides a list with *all* members of the organization, if the assignment on the project level is not use (project unassigned). But in any other case, the assignment onm the lower level is more important and therefore overwrites that from the organization.
This would actually address scenarios where you work for an organization on several projects where people from that organization not necessarily know about all the projects in their own company.
Now, I've put that all in one function in storm_dashboard and I happily share that with you, if you wanted to. Please feel free to grab it and stick it into Storm and/or modify it to what ever you want to do with it.
Comment #25
Magnity commented@jurgenhaas:
Would you be able to point to the particular place in your code that deals with the assignment please?
Also, if you're happy for the features you've coded to go into Storm, then it'd be great if you could submit patches for those bits.
Comment #26
jurgenhaas@maginity, please find attached the patch for the assignment options. It's a central function in storm.module which is called by the stormticket_form and stormtask_form respectively. I've tested it and it works apart from the organization or project being changed from within the form. If the rest of it is OK we can probably access that in a second step.
Comment #27
Magnity commentedThanks, I'll test it out properly in due course. I am still wondering about the best options to display too though.
Just a quick question from reading through the code:
What does this bit do?
I'm on crack. Are you, too?
Comment #28
jurgenhaasThis whole function is used in two ways: (1) to create select options for the filters (which needs all teams and persons as well as the two options "all" and "mine") and (2) to create the select options to assign an existing task/ticket to someone (which doesn't need those two options).
Mode (1) works if you do not provide any $organization_nid and mode (2) otherwise. This is also partially described in the function comment above.
Comment #29
nicoloconte commented@all, next step is to add a filter for "assigned to" to task and ticket. It may be also a good idea to add the possibility to send an email to the person that has been assigned to.
Here my code for the email function (in italian language :) but I can translate it):
I hope that can help you...
Nicolo'
Comment #30
gnuwings commented@magnity:
Thanks for fixing the bugs. I have tested it and it looks good. Since the basic features are working, I'm going to implement it on my production instance. This will surely give more feedback from the actual users.
@all:
I really liked to contribute code to drupal and storm module. However, I only have limited exposure to Drupal source code and hence didn't made an attempt. I'm still in the learning process but it's taking too much time due to other priorities. Your help and encouragement is driving me forward.
Comment #31
Magnity commented@jurgenhaas: A couple of errors applying the patch in #26:
@nicoloconte: A good extension to get an email out, but would it be possible to post your code in diff format and to include a setting to control whether the emails are automatically sent out?
@gnuwings: Please remember that the 6.x-1.x-dev is as stated a development branch. I'd recommend that if you're using it on a production site that you upgrade to the next available official release when it comes out, or test -dev releases carefully before putting loading onto your production site.
Comment #32
Magnity commentedCorrection: Patch in #26 does apply properly. I wasn't quite on the latest dev.
However, I think this does need to account for changes in the organization/project dropdowns before going in.
Comment #33
jurgenhaasOK, here is the second part of the patch, please apply *in addition* to the first patch in #26. It reacts to organization and project select changes in the task and ticket add/edit form. There is one cosmetic todo outstanding but I wanted to provide this for your review first before watsing time on that last little piece.
Note: please flush your menu cache after applying this patch because there is a new menu entry to be recognized.
Comment #34
Magnity commentedHaving applied both patches (#26 and #33), the options drop down is a bit odd...
Screenshot attached.
I wouldn't expect to see empty options, the identation doesn't seem consistent, and wasn't expecting to see -no filter- and -mine- on the add task box.
Comment #35
jurgenhaasHere is the improved version of the patch. You now only need to apply this one patch to the latest -dev and it now has also the proper optgroup structure in the drop-down.
Comment #36
Magnity commentedOptions dropdown still doesn't seem quite right... see screenshot.
The 0 / 4 seem to be eroneous.
Comment #37
jurgenhaasCan you please help me debug this? When this happens, can you please look into the HTML source and see the values of the wrong select items? Those values should be node-ids of people but I don't know why it's using the numbers instead of their names.
The latest patch includes the modification that we use the $person->fullname if available and if that's empty, then we use $person->name
Are you probably having people with no fullname provided?
Comment #38
nicoloconte commented@Magnity:
Add this piece of code into "function stormticket_form(&$node)" to control whether the emails are automatically sent out:
I can't create a diff file because this extension was implemented into an old storm version.
The code that I posted is good also for project ad task!!
Another important step is to add a filter to choose the "assigned to" person.
Comment #39
Magnity commentedThis seems to be the html for the dropdown:
I think it could be that the 'fullname' field is blank. However, the person nodes do have titles, so I wonder if that could be used instead?
We could also try to 'design out' the dual name field on the person record. I don't see why we need both a 'name' and a 'fullname' fields. Perhaps that is a different issue.
#38: @nicoloconte: I'll split this into a separate issue and post something when I get a minute. Its probably best we keep this one on the main options issue.
Comment #40
Magnity commentedI've left the patch in operation on the demo site by the way, so @all can have a play around with it. That has the advantage of lots of example data of various levels of completeness...
Comment #41
jurgenhaasThis seems really strange and I double-checked the code, not knowning where this is coming from. The fact that your HTML is having 4 optgroups is what should be impossible.
The function storm_get_addignment_options delivers an array of the following structure:
and if there is no team or person, then the sub-arrays for teams or people get removed before returning the options-array.
Each sub-array generates an optgroup in the resulting html, so there can only be two, one or none. So I'm struggling how your html is getting 4 of them.
Is it possible that you check the Firebug-Console and see what the AJAX request is getting as an answer from the server when populating the select box with those values please?
Once we know that, we can determine whether the php code producing the array or the js code transforming that into html, is going wrong.
Comment #42
nicoloconte commented@Magnity, can you create the new issue for the email extension?
I created by now a module that works with the new storm release! You can find it attached to this post, I'm weating for feedbacks.
Thanks a lot for your work!
Comment #43
dwork commentedI implemented stormmail.zip. First, I had to change the Italian to English, so you might consider keeping those phrases at the top of the module or in a database extension. Second, I had some trouble with drupal_mail (evidently I'm not alone). I wasn't able to debug it per se, but I installed the SMTP module using SLL and it works just fine now. Thanks for stormmail, this was needed.
It might be useful to allow the Email flag to default to Yes instead of No, and to allow the assignment to "stick" on the project/task/ticket. That is, if I select "Yes" on project "X", then any update to project "X" results in an email.
However, as for the rest of this thread, I must be thick. I have trouble following the threads of development interchange, multiple patches, the lack of a link to the development module, etc. I just installed storm-6.x-1.28.tar and it does NOT have the ability to assign a task or ticket to a person. I'm reluctant to install from the CVS repository due mostly to my inexperience with Drupal, but I'm also unclear as to whether the patches in this thread were applied on the test site, to the dev module, or what. Sorry.
The ability to assign tasks and tickets to individuals is mandatory for my company and an integral part of more robust ticketing systems such as RT.
Comment #44
jurgenhaas@magnity, your problem creating tasks/tickets is most probably related to #663164: stormproject is an undefined function
Comment #45
Magnity commented@all:
All conversions re the email notifications functionality should go into #637852: Email notification..
@jurgenhaas:
Re #41: Will have a look when I get a minute.
Re #44: Which problem was this?
Comment #46
jurgenhaas@magnity:
The problem in the third para of #43.
Comment #47
Magnity commented@jurgenhaas: Still confused as to what #663164: stormproject is an undefined function has to do with this one.
Comment #48
Magnity commented@jurgenhaas:
Re #41:
It looks like it is due to the fullname being blank.
This is the JS response:
{ "none": "- unassigned -", "Teams:": { "5": "Example Team" }, "People:": { "4": null, "0": null, "91": "rallermann" } }Doesn't $person->name need to be set somewhere? (Forgive me if I've overlooked this). It doesn't seem to be in the SQL query. The name is simply the node title, so perhaps we should add n.title to the select and use that?
This review is powered by Dreditor.
Comment #49
jurgenhaas@maginity: regarding #47, I was under the impression that you had a problem with Storm as you were saying "...I just installed storm-6.x-1.28.tar and it does NOT have the ability to assign a task or ticket to a person. I'm reluctant to install from the CVS repository due mostly to my inexperience with Drupal, but I'm also unclear as to whether the patches in this thread were applied on the test site, to the dev module, or what. ..." and I thought that #663164: stormproject is an undefined function would be a hint - however, I might have misinterpreted your post.
Comment #50
jurgenhaasAttached is another complete patch against the .dev release from this morning. It solves the problem with the null values and also does an additional sanity check, just in case, title was empty too.
Comment #51
Magnity commented@jurgenaas:
Re #49: I see - we're talking at cross-purposes on this. I didn't write the original comment in #43.
To clarify for all:
- 6.x-1.28 contains none of this functionality
- 6.x-1.x-dev contains the basic assignment but not with these patches
- Test site runs 6.x-1.x-dev with the patch _options_3 (currently)
Will test in due course.
Comment #52
jurgenhaas@magnity, I'm sorry. I didn't recognize the error in #43.
Your clarification in #51 is OK.
What you should do for furethr testing: use the Storm dev-release from December 31st and the storm_assignment_options_4.patch from #50.
Comment #53
Magnity commentedOK:
- 6.x-1.28 contains none of this functionality
- 6.x-1.x-dev contains the basic assignment but not with these patches
- Test site now runs 6.x-1.x-dev with the patch _options_4
I'm still getting a zero as per the attached screenshot.
Its a bit odd that it is a zero too - as there can't be a nid for a person of zero.
Comment #54
jurgenhaasNot sure where this is coming from and it can't be analyzed without having access to the data in the background. Maybe a team with team member zero?
Anyway, I've included another sanity check and remove records with a zero id before delivering it back to the browser.
Comment #55
Magnity commentedThe problem was caused by a bug in the saving of teams. A zero:Null entry was always added to the members array. I've opened an issue for this at #671588: Team members array always has 0:Null appended.
With the alteration below, I think this is ready to be committed. I'll leave it at RTBC for a day or so in case people who've subscribed to this issue wish to test.
Because the entry (if it exists) has a value Null, these don't currently pick up the problem.
I replaced
isset($options[$people][0])witharray_key_exists(0, $options[$people])and this worked. Similarly for the teams lines.I'm on crack. Are you, too?
Comment #56
jurgenhaasExcellent news. Thanks @magnity for sorting this whole thing out.
Comment #57
Magnity commentedPatch in #54 with modifications from #55 committed to DRUPAL-6--1.
Thanks to all for your efforts on this issue, especaially @jurgenhaas for the work on this patch.
Marking as patch needs porting as the functionality needs to go into the Drupal 7 branch.
@all: Please could you upgrade to the latest dev (rolls at midnight), as I plan to release 6.x-1.29 in a few days with this codebase.
Comment #58
gnuwings commented@Magnity
Have you got time to port the view stuff(item #3 in comment #23) into D6? I am trying to understand how views works in D6. I will surely test the latest dev later tonight.
Comment #59
Magnity commented@gnuwings:
The views integration that I mentioned in #23 is effectively a complete rewrite of the way that lists are displayed in Storm. It is not complete for the D7 version yet. Therefore, I will not put this into the D6 version until it is complete in the D7 verson.
You can override any of the Storm lists yourself in views however. Create a view via the Views UI, and then create a small module using hook_menu_alter to remove the existing menu callback for the Storm list and set the view path to that. Views is worth playing around with, as it is very powerful and simple once you get the hang of it.
Comment #60
Magnity commentedCommitted this code to D7 (although it will probably be reworked as the port progresses to fit in with Fields API etc)
Also changed the structure of the projects dropdown a little to use the options groups etc.
I think that makes this issue fixed. Thanks all for the input.
Comment #61
jurgenhaasGood work and collaboration on this, thanks @magnity.
Comment #62
gnuwings commentedI have installed the latest stable version of storm module, but when I create or edit task, the following warning occurs:
This warning occurs only if there are no teams configured in storm. I have tried to fix it in the source, but my inexperience in the code made it ugly and I'm not sure whether it's the ideal solution. Can somebody look into this?
I would like to appreciate @Magnity and @jurgenhaas for the addition of wonderful features in storm.
Comment #63
Magnity commentedNow that the feature is in, any bugs should go into separate issues.
I've created a new issue for this: #678250: Warning on create/edit task.
Comment #65
francewhoaI'm not a coder. Would that patch add the following new feature?
http://drupal.org/node/738842#comment-2702710