Project:Feedback
Version:7.x-2.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Jody Lynn
Status:closed (fixed)

Issue Summary

Is this already part of feedback?

Comments

#1

Title:Will Feedback 2 be integrated with views 2» Views integration
Category:support request» feature request
Status:active» postponed

Not yet.

However, I'm also not (yet) sure whether we will convert feedbacks into nodes, @see #351698: Use entities for Feedback messages

#2

i was using case tracker but feedback is so convenient for giving feedback.

Edit- any progress on this front? This would alleviate the headache of creating your own view. You can leverage views so people can create custom views.

This could become a great ticketing/bug/feature request system.

Chris

#3

Quick patch against 6.x-2.x-dev. Works against 2.0.

Leaving status as postponed until the other nodes issue is decided.

AttachmentSize
feedback-453820-3.patch 4.45 KB

#4

Rolled against 2.0 for those who need it.

AttachmentSize
feedback-6.x-2.0-patch-views-4453820-3.tar_.gz 16.69 KB

#5

Status:postponed» needs review

Haven't seen any progress on #351698: Use entities for Feedback messages.

This should be an easy change, even if there is a switch to nodes later. Switching to needs review.

#6

Re-rolled the patch against the latest release.

AttachmentSize
feedback-453820.patch 4.4 KB

#7

Hi, will this be committed please?
thanks a lot in advance for considering, would be great to have views support.
greetings, Martijn

#8

I expanded and fixed up the views integration and added a disabled default view to allow takeover of the Feedback messages report page.

It lacks the ability to use checkboxes to mark messages as 'processed'. So the next step is to create a VBO default view as well, which will tie into other open issues about actions/rules integrations and the ability to delete messages.

The basic views integration of all the data is complete though and ready for review.

AttachmentSize
views-int.patch 13.37 KB

#9

Subscribing.
I'd like to create a view for administrators that I could use to replace the menu item for the report that displays the number of pending feedback messages, with tool-tip titles, like so:

Feedback (12)

#10

I've been able to replace the menu item using the patch and a view with custom displays: attachment_1 and block_1.
Attachment_1 is pretty simple. Just a default argument of 1 for feedback: status and the only field is the global counter. It's not attached to anything, rather it just used for the query.

Block_1 has no arg and 1 field: custom text with blank text. In the header, type: php I added this code to capture the record count of the above query and use jquery to update the 'feedback messages' link to include the total number of active messages:

<?php
if(!function_exists('recordCount')){
function
recordCount($viewName,$displayName){
   
$view = views_get_view($viewName);
   
$view->execute_display($displayName);
    return
count($view->result);
}
}
/*get the record count:   */
$totalCount=recordCount('feedback','attachment_1');
$feedbackLinkOutput = '<a class="appended" title="Link to Feedback report" href="/admin/reports/feedback?&page=,0">Feedback messages</a> <a href="/admin/reports/feedback?&page=,0" title="There are '.$totalCount.' feedback messages pending.">('.$totalCount.')</a>';
$feedbackView_js = <<<JAVASCRIPT
Drupal.behaviors.feedbackView = function(context) {
var theItem=$("#sidebar-left a:not(.appended):contains('Feedback messages')");
if(theItem.length>0){
  theItem.parent().append('
{$feedbackLinkOutput}'); theItem.remove();
}
}
JAVASCRIPT;
drupal_add_js($feedbackView_js, 'inline');
?>

Then I put the block in the footer. Next up would be to roll this into a custom module but it worked, so I thought I'd share the code thus far.

#11

This issue is on adding views integration not creating a specific view. This kind of view should be created by choosing 'show summary view' from the default argument settings.

#12

Version:6.x-2.x-dev» 7.x-2.x-dev
Assigned to:Anonymous» Jody Lynn
Status:needs review» needs work

#13

Status:needs work» needs review

Minor changes, and this is working fine on 7.x.

AttachmentSize
453820.patch 12.84 KB

#14

I rerolled it. The default view it provides overrides the feedback reports page using a view (see screenshot)

AttachmentSize
453820.patch 20.78 KB
Screen shot 2011-05-02 at 4.48.06 PM.png 128.44 KB

#15

Looks good - but how are we going to manage feedback messages? VBO?

#16

Yeah, so I think the options are to add actions integration and VBO or to use flag (with or without actions integration, depending on whether we use the flag states themselves or continue to rely on the feedback module statuses).

A simpler option would be to just add a link to the full entry display to switch the entry between processed and open. That makes sense to have anyway, and I'm already adding a similar 'delete' link in another issue.

I think it still makes sense to push the views integration including the default view in the meantime without the ability to change the states because now that feedback is fieldable you have to have a customizable view in order to add your custom fields to the report.

#17

Status:needs review» needs work

The default view needs some "No Results Behavior". Otherwise the page is completely empty when you first visit it after install, with no feedback yet.

I like the VBO idea, but either way this should probably wait on #323506: Allow to delete items, so that we can add a delete link to the default view.

#18

Status:needs work» needs review

I added empty text and delete links and changed the views api requirement to 3.0.

AttachmentSize
453820-18.patch 25.93 KB

#19

This looks good to me (though I'm not really familiar with the Views API, so need to rely on you guys here to do it properly).

However, final adjustment: I'd prefer to have all or most Views support files in a /views sub-directory. The more the better, though I'm not sure whether Views supports to move all. All I know is that you can simply specify 'path' in hook_views_api() to accomplish this.

#20

Status:needs review» fixed

Thanks for reporting, reviewing, and testing! Committed to 7.x-2.x.

A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.

Prior to commit, I disabled the default view by default.

Feel free to re-open this issue if you see problems or room for optimization.

#21

Status:fixed» closed (fixed)

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

#22

Any chance for a D6 backport?

nobody click here