Even if the Project filed is reported as required in the ticket creation form, there is no real validatation check for it so it's possible to assign the "-" project for the ticket.
If you think that a project has to be optional in the ticket you could remove the '#required' => true project form attribute, but if you think like me that every ticket has to be assigned to a project then the attached patch does this validation work.

CommentFileSizeAuthor
storm_project_validate.patch826 bytessamuelet

Comments

Roberto Gerola’s picture

Category: bug » task

I agree partially with your use case.
Many times I receive requests from customers that our outside the scope of any existing project
or that could be a start of a new project, for example the request of an estimate.

samuelet’s picture

Then, what about a project properties (storm attibute?) that let administrator to choose if ticket is mandatory or not ?
My goal is a ticket form whose properties are allowed or denied depending on user access: i.e anonymous users are enforced to assign a project for ticket but are not allowed to set a begin/end date, whereas authenticated users belonging to the staff group are free to choose to set or not to set them.

jorditr’s picture

Let me propose something else about ticket entries.

I would like to open a ticket area on my site for my custormers. I want to free the option to anonymous users to send me tickets just to start encouraging users to send me their requests by the tickets system and not by email. But I would like to have a role where the three fields "Organization", "Project" and "Task" were hidden to them. to me it makes sense to have does fields separated with a role. General users would send me a ticket, the support resposible would assign them to the organization, project and task he/she would consider and then start on that point the support workflow to that ticket.

Roberto, do you think that makes sense for your Storm? :-)

samuelet’s picture

Any further second thought about this issue?

Magnity’s picture

Could I just clarify this issue:

1) The original posting indicates that currently we say that the project field is required, but in fact allow it to be blank.
- The patch will enforce that it is required
- Alternatively we can remove the "required" mark.

2) Then in the further comments we have the issue of requiring fields by role.

I think it might be best to separate this into two issues, the current issue being 1), and 2) being a new issue, as they are distinctly different.

My thoughts on 1) is that enforcing the required would reduce usability, so no matter what may / may not happen with 2), it is better to simply remove the required mark.

Any thoughts?

Magnity’s picture

Title: Project required when ticket is created » Requiring fields according to role
Category: task » feature
Status: Needs review » Active

I've just been testing this one out. In fact the current behaviour is that the project field is NOT marked as required, so therefore is consistant with the validation behaviour - which I believe is the best option.

Therefore i'm changing this issue to focus on the second point - of "requiring fields according to role".

GreyHawk’s picture

Just piping in here -- I don't think tickets should be required to have projects assigned; I use tickets for both projects and ad hoc support requests from organizations.

I might add in a CCK field to denote a ticket category, but as I'm still getting a feel for Storm I haven't wanted to make any changes of that nature yet.

Magnity’s picture

Component: Code » Storm.module
betancourt’s picture

Hi:

I am also trying to find a solution so my customers can create a ticket and cannot see all the fields. I don't want the to see the price mode, date begin, date end, etc.

Just to be able to put a title and description, maybe select the project and/or task

Has anyone found a solution to this?

neubreed’s picture

I would also like to hide fields from certain roles, the simpler you can make filling in a ticket for a customer the better!

Jim Ruby’s picture

As a new user to Storm I have not looked at the ticket system yet, but if I was a visitor o a site and filled out a ticket why would I need to see the extra information project, task, amount etc. really all that consirns me is title, priority ow medium high, whatever. and a place to write about my problem or request.
I would not want a user to see this information untill we enter in to an agreement and even then it is not necessary.

Just my 2 cents.

SiteMaster.ServeLime.com’s picture

Fully Agree with previous comments.

It would be great if access control can be added to the following:

Ticket Field

Control:

Access Control:

Organization/Project/Task Group

Visible/Hidden

Can View

Organization: *

Required/Optional/Hidden

Can View

Can Edit All

Project

Required/Optional/Hidden

Can View

Can Edit All

Can Edit Own Org

Task

Required/Optional/Hidden

Can View

Can Edit All

Can Edit Own Org

 

 

 

Category/Status/Priority Group

Visible/Hidden

Can View

Category

Required/Optional/Hidden

Can View

Can Edit All

Can Edit Own Org

Status

Required/Optional/Hidden

Can View

Can Edit All

Can Edit Own Org

Priority

Required/Optional/Hidden

Can View

Can Edit All

Can Edit Own Org

 

 

 

Date/Duration Group

Visible/Hidden

Can View

- Date begin

Required/Optional/Hidden

Can View

Can Edit All

Can Edit Own Org

- Date end

Required/Optional/Hidden

Can View

Can Edit All

Can Edit Own Org

- Duration unit

Required/Optional/Hidden

Can View

Can Edit All

Can Edit Own Org

- Duration

Required/Optional/Hidden

Can View

Can Edit All

Can Edit Own Org

 

 

 

Price Group

Visible/Hidden

Can View

Price mode

Required/Optional/Hidden

Can View

Can Edit All

Can Edit Own Org

Price

Required/Optional/Hidden

Can View

Can Edit All

Can Edit Own Org

Price currency

Required/Optional/Hidden

Can View

Can Edit All

Can Edit Own Org

 

 

 

Assigned to Group

Visible/Hidden

Can View

Assigned To Team

Add ability to assign to a TEAM (e.g. Dev Team, Support Team)

 

 

Assigned to Person

If Team selected, person must be from same team, else can be from any team in same Org as current user

Required/Optional/Hidden

Can View

Can Edit All

Can Edit Own Org

Thanks for this AWESOME WORK :-))

tchurch’s picture

subscribing

betancourt’s picture

I found this module but not sure if it works with Storm, has anyone use it? it could be a solution to this issue.

http://drupal.org/project/formfilter

Thanks

juliangb’s picture

From a first look at the formfilter module, it probably isn't as flexible as required by the people on this issue, but could be a simple stopgap.

akolahi’s picture

I agree with others. More than any other storm content type, the Ticket type is often used to also allow clients to add support requests etc.

For me it would make sense to have clients be a "Stormperson" content type (with a linked Drupal user), requiring them to log into drupal to create a ticket. They would belong to an Organization, like other stormpersons.

I agree that they should not be able to see certain fields such as "Price mode", Price, etc. I'm pretty sure my clients would want the rate to be "$0".

I think the best case would be to make is sort of like CCK's "Content Permissions" module, which allows view and edit permissions on each field based on role.

edit:
Just saw number #12. that would work too :)

juliangb’s picture

Status: Active » Closed (won't fix)

This is an important feature, but I do not wish to solve this within storm.

The best long term solution is to move into Drupal 7 and switch to fields in core. This would make everything much more flexible.

To those looking to solve this in Drupal 6, the best method is a custom module which alters the form to hide the fields based on permissions.

So, the way to move this forward is to help get Storm into D7 and using fields in core.