Closed (fixed)
Project:
Storm
Version:
6.x-2.x-dev
Component:
Storm.module
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
13 Nov 2011 at 22:38 UTC
Updated:
19 Dec 2011 at 12:48 UTC
Jump to comment: Most recent file
Comments
Comment #2
juliangb commentedHi @ronline,
I think this could be a useful feature.
A couple of suggestions based on a very quick look at the screenshot and patch:
- Would it be neater to include the number in the existing text?
Notes (5) +
Tasks (17) +
etc...
- What does the code do in terms of access? If as a user, I don't have access to some of the tasks, does it show the total that I can access, or the total in the system?
Comment #3
ronline commentedGreat !! Yep include it into release!
I moved the number into the text, patch is attached.
The code is not checking the user access level, it is showing the total number in the system.
We can write down requirements to add setting options for admin/settings/storm.
Comment #4
juliangb commentedSetting to "Needs Review" so that the patch is automatically tested.
Comment #6
juliangb commentedOK - a couple of points on this - firstly the tests need to pass!
Also, I think that we should check the user access. Otherwise there will be an odd situation when the user sees a number of tasks/tickets, but may not see all of those when clicking the link.
Comment #7
ronline commentedUser with administrative access level see number of all existing tasks, tickets, notes and timetrackings.
Authenticated user doesn't see anything till admin doesn't set permissions in admin/user/permissions as following:
Stormtask module: Storm task: access, Storm task: view if assigned to task
Stormticket module: Storm ticket: access, Storm ticket: view if assigned to ticket
Stromtimetracking module: Storm timetracking: access, Storm timetracking: add, Storm timetracking: view own
Stormnote module: Storm note: access, Storm note: add, Storm note: view own
After that will authenticated user see the number of task and tickets he's assigned to and number of notes and timtrackings he's created.
Comment #8
juliangb commentedI think a better way to check the access will be to pass the SQL queries through stormtask_access_sql() before executing (or a similar function for each storm module).
Comment #9
kfritscheI like this idea, so I reviewed the patch too and fixed some issues.
Here the changes i made:
New Patch attached.
Comment #10
kfritscheoO
attached old patch from ronline, sorry for that.
Comment #11
ronline commentedI've tested the patch. All works fine till line 238, then is the number of items getting lost in function theme_storm_number_items. The function is not being executed. I've tried anything hard written return, die(), var_dump ....
Comment #12
kfritscheHave you cleared your theme cache, after applying this patch?
It add a new theme function, so you must clear your theme cache, otherwise drupal won't find this theme function and nothing happens. You can do this at http://domain.com/admin/settings/performance, there is a cache clear button.
Sometimes I hate Drupal for this behavior, why the hell issn't there a error, when a theme function is called, that doesn't exists!
Comment #13
ronline commentedYep it was in the cache.
Sorry about false alert.
Comment #14
kfritscheno problem, glad to help.
so i assume it works for you now, too?
setting this to reviewed & tested by community.
I will commit this later this week.
Comment #15
ronline commentedYep work nice now.
Will post a report if I spot anything.
Thx for the hand.
Comment #16
kfritschecommited to 2.x