Domain key shown instead of domain value in ticket display
sbogner - July 4, 2009 - 12:58
| Project: | Storm |
| Version: | 6.x-1.x-dev |
| Component: | Storm Ticket |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
I changed the value of the Ticket status key attribute 'inserted' to display the value 'new' instead. I create a ticket that has status of 'new'. However, when I display a ticket, it reports the status as 'inserted' instead of 'new'. When I edit the ticket, I get the correct value of 'new' instead of 'inserted' - so it looks like it's a display issue.

#1
It also shows the value 'inserted' in the views output.
Is there any harm in just changing the key to be 'new' instead of 'inserted', or should I stick with the delivered ticket status keys (same question goes for other storm attributes, I suppose).
But it seems if the module allows us to change the values for keys, that should work consistently, including views.
#2
in some way it is working in others it does not.
you can change the key and the value of that key. if you only change the value of the key - everything shopuld work just fine and you will have text "new" in selection box when editing a ticket.
but if you change the key, you can expect this behavior.
it is possible to make a function that updates all tickets/tasks/whatever/... after changing attribute key, but that would be feature request, and would be subject of discussion.
so i'm changing category to feature request.
#3
I think that #2 and the OP are at a slight misunderstanding - if an attribute value is changed then NEW tickets SHOULD show the new value. Especially if there is an inconsistency between the edit form and the node view.
Therefore - bouncing back to bug - but I suspect it will be a fairly minor fix.
#4
You are right, I have missed the display problem. And, thou solution is simple (here is little patch for ticket status field) - the same thing is for all attributes. No?
Problem is that theme_stormticket_view is showing the name of the key instead of its value.
Am I missing something or this is part of a bigger problem?
#5
I've committed the change to the ticket status field, but yes, it looks like this will affect all attributes across the board, so i'll leave this open and perhaps look at a change to the way that those variables are called to include the value instead of key.
#6
Used
stormattribute_value($domain, $key)to change all attribute driven fields in Storm Ticket, and also checked through the other modules - so I think they are all ok now.#7
I downloaded and applied 6.x-1.x-dev today, and when I created a new ticket the status display issue is still there - displays inserted instead of new. I double-checked my attribute setting, and it is correct (value 'new' for key 'inserted'). Am I missing something?
#8
It looks like there was still a problem - with the function I was using to return the values.
Here is the diff if you want to try it before midnight: http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/storm/storm...
#9
That fixed the display in storm - it shows 'new' instead of 'inserted' now. But, in views it still shows 'inserted'. Was this supposed to fix the display in views, also?Or is that a different issue?
#10
That's a different issue - I suspect its quite easy to solve with a handler but I'll have look in due course.
#11
I'd like to solve this issue before the release of 6.x-1.24.
(See #540212: Testing of -dev version before 6.x-1.24 release)
#12
Here is a patch which should fix that issue.
The handler file needs to be rename to remove the "_.txt" from the end and uploaded to the stormattribute folder.
After applying the patch, please clear the site caches.
If that works for you as well, i'll apply to the other fields which need it too.
#13
I've committed this change to all fields that are driven by attributes (across the Storm modules).
Therefore, I believe this is fixed.
#14
Automatically closed -- issue fixed for 2 weeks with no activity.