Download & Extend

Adding and removing attributes to STORM content types

Project:Storm
Version:6.x-1.x-dev
Component:Storm Attribute
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

For the life of me I can't figure out how to do this:

On the "Ticket" content type in STORM, how do I remove a few extra attributes and add some of my own? I've created the attributes of course in the attributes area, but I cannot figure out how to add/remove them to the display/creation of a ticket (by user Role would be pretty sweet too!).

Please let me know if I'm missing something very basic!

Comments

#1

it doesn't seem to map directly but one alternative is to modify the code in the stormattribute.install file. then uninstall the stormattribute module. clear your drupal cache. upload your new code for the stormattribute module and re-install the stormattribute module. it's pretty easy to alter the arrays. for example i changed my Project Status to different values with the following (p.s. make sure you go through and replace all instances in the code):

<?php
  $attributes
['Project status'] = array(
   
'Quote/Grant' => 'Quote/Grant',
   
'Planning' => 'Planning',
   
'Executing' => 'Executing',
   
'Completed' => 'Completed'
 
);

 
$attributes['Project status search'] = array(
   
'Quote/Grant' => 'Quote/Grant',
   
'Planning' => 'Planning',
   
'Executing' => 'Executing',
   
'Completed' => 'Completed'
 
);


?>

Hope this helps!

#2

Oh please tell me there's something coming in UI to do this! (That is, the hiding and showing of attributes in the header)

#3

Would indeed be nice to have this in a ui...

Just started configuring STORM but I wonder why it's not all CCK based, or is it somehow?

Cheers

#4

Subscribing

#5

I ended up solving this in a very web-devy sort of way. I simply put the following in my local theme css override:

#edit-pricemode-wrapper, #edit-price-wrapper, #edit-currency-wrapper{display:none;}

AttachmentSizeStatusTest resultOperations
screenshot_025.png23.66 KBIgnored: Check issue status.NoneNone

#6

We've decided not to continue the use of STORM due to the lack of customization options.
Your problem would have been so easy to fix if it was all CCK based.
Your workaround is a clever solution to it but I don't think it should be the way.
IMO it's not the Drupal way... yet I could be wrong :)

Cheers

#7

Version:6.x-1.20» 6.x-1.x-dev

Marked #317517: creating a new Attribute for Project status doesn't make it available for filtering as a duplicate of this.

#8

Status:active» fixed

Have just investigated this one:

The original issue has been fixed in newer versions of Drupal - adding attributes through storm attributes will make them automatically come up in the create xxx form.

The comments about showing / hiding fields can already be done by overriding the theme function.

#9

Magnity -- Does this have any relevance to the creation of new Attributes for Knowledge Base? Those new attributes / Knowledge Base types show in the filter, but any knowledge base articles / nodes created do not list. I created a separate issue about it here.

It almost appears as if Knowledge Base items could be properly tagged and parented using standard Taxonomy instead the current implementation...? Would that be feasible?

*Edited to add: Tho I like the concept of KB articles as book types...if it could be incorporated with Taxonomy as well, that would be pretty spiffy.

#10

#454412: Knowledge Base doesn't allow filtering by non-default attribute is a different issue, which seems specific to the Knowledge base part of Storm - I don't think it is related to this issue at the moment.

#11

Status:fixed» closed (fixed)

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

#12

Component:User interface» Storm Attribute

What version is this fixed in? I am running Storm 6.122 and still cannot figure out how to add newly created attributes. Can I only create new options for the drop downs? Or can I create whole new fields via attributes versus cck?

#13

Status:closed (fixed)» active

Perhaps I misunderstood this ticket - I thought it to mean options for the dropdowns.

There isn't support for adding / removing fields.

Reopening for consideration, but I suspect it may be more viable after #293485: Integrate with CCK.

#14

Category:support request» feature request

Recategorising...

#15

Our problem is:
After translating all the key and value attributes and domains into Spanish we are no longer able to create new storm content that takes advantage of attributes: all belonging to attributes are missing.

http://gnu.manticore.es

#16

@ventolerac - it will probably work if you don't translate the domain values.

If you have problems with this, please create a new issue as this topic is mainly about a feature for being able to add and remove fields to Storm content types.

#17

my proposal for removing fields:

if a given field has all attributes disabled or removed, then it should not appear on forms. I can begin to write a patch for this immediately.

#18

I was able to remove the fields that I didn't want displayed using a custom module and form api. I can post the code if anyone is interested

#19

@iamjon, please do post the code.

#20

So a bit of explanation, we had to make the add ticket form translatable and had to remove some things from the view (All the time management and pricing stuff were not relevant for our customers, and we wanted to block it from the form)

I used this article as a base on how to use form api: http://www.lullabot.com/articles/modifying-forms-5-and-6

Here's the function

function modulename_form_alter(&$form, $form_state, $form_id) {
switch ($form_id) {
case 'stormticket_node_form':
$form['group1']['task_nid'] = array('#access' => 'false' ,);
$form['group1']['task_nid_old'] = array('#access' => 'false' ,);
$form['group3'] = array('#access' => 'false' ,);
$form ['group4'] = array('#access' => 'false' ,);
$form['title'] = array(
'#type' => 'textfield',
'#title' => t(Title),
'#required' => TRUE,
'#default_value' => $node->title,
'#weight' => module_exists('content') ? content_extra_field_weight($node->type, 'title') : -18,
);
$form['body_field']['body']['#title'] = t(Description);
$form['body_field']['teaser_include']['#access'] = FALSE;
break;

}
}

#21

Hi all,

I was wondering how I could add (a selection of) attributes to the timetrackings system. E.g. I want a no-customer/project/task related issue called something like "helpdesk or call center". I would add this to know how much time a co-worker is helping a customer on some predefined "attributes" - "software/hardware" wise. This to - eventually - bill that/those customer(s) at the end of the day/month for the service provided, In the end it may be (automatically) billed.

An example : Helpdesk concerning e.g. Quickbooks, MS Office,... (and/or any other piece of software/hardware);
any customer can call in; there's (no need for a) project/task attached to the customer (yet, at that time anyhow).
The co-worker is answering the question(s) in a few minutes, making notes in Storm.

Am I looking at the right (possible) solution?

#22

NEVER MIND ... found the solution myself in Storm's Attributes section ...

#23

Status:active» fixed

OK, we have several solutions depending on the exact problem you face:
- How to remove options from the dropdowns? Storm Attribute
- How to remove fields from the content types? A small custom module as per #20
- How to add fields? CCK

#24

Status:fixed» closed (fixed)

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