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

sbogner - July 4, 2009 - 13:11

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

homoludens - July 5, 2009 - 02:33
Category:bug report» feature request

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

Magnity - July 5, 2009 - 12:48
Category:feature request» bug report

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

homoludens - July 5, 2009 - 14:29

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?

AttachmentSize
stormticket_theme_status.patch 837 bytes

#5

Magnity - July 5, 2009 - 15:03

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

Magnity - July 5, 2009 - 16:47
Status:active» fixed

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

sbogner - July 15, 2009 - 11:20

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

Magnity - July 15, 2009 - 17:47

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

sbogner - July 16, 2009 - 11:30

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

Magnity - July 16, 2009 - 13:16
Status:fixed» active

That's a different issue - I suspect its quite easy to solve with a handler but I'll have look in due course.

#11

Magnity - August 4, 2009 - 23:18

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

Magnity - August 10, 2009 - 13:18
Status:active» needs review

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.

AttachmentSize
stormattribute_handler_field_attributes_domain.inc_.txt 353 bytes
stormticket_510056_views_inc.patch 1.05 KB

#13

Magnity - August 12, 2009 - 18:00
Status:needs review» fixed

I've committed this change to all fields that are driven by attributes (across the Storm modules).

Therefore, I believe this is fixed.

#14

System Message - August 26, 2009 - 18:10
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.