I just needed an action with Views Bulk Operations to publish a comment and realized that none exists.
So, I thought I'd add one to 7.
Comment | File | Size | Author |
---|---|---|---|
#62 | comment_publish_statistics_D6-360023-62.patch | 1.1 KB | kongoji |
#50 | 360023-comment.patch | 1.24 KB | Steven Jones |
#27 | 360023-action-comment-publish-d6.patch | 5.64 KB | andypost |
#21 | drupal.action-comment-publish.21.patch | 6.02 KB | sun |
#16 | drupal.action-comment-publish.16.patch | 6.22 KB | sun |
Comments
Comment #1
moshe weitzman CreditAttribution: moshe weitzman commentedlooks good. maybe swap the doxygen for each param so they match the order in the function signature
Comment #2
gregglesI had just copied this from the other actions in the file which had misleading doxygen.
So, here is a new version of the patch which fixes the doxygen and some trailing whitespace. I apologize to the kittens :/
Comment #3
moshe weitzman CreditAttribution: moshe weitzman commentedNice doxy cleanup.
I will rtbc after that.
Comment #4
rszrama CreditAttribution: rszrama commentedRe-rolled with Moshe's recommendation along w/ commas after the closing ) for the hooks arrays per the Arrays coding standards (comma at the end of the last array element).
Comment #6
stella CreditAttribution: stella commentedPatch re-roll.
Comment #7
stella CreditAttribution: stella commentedand a Drupal 6 version
Comment #8
cburschkaYay! I pored over this excellent patch in search of typos and actually found something! :)
Trailing commas are only supposed to be added to multi-line arrays, so the one after COMMENT_UNPUBLISHED should go.
Got nothing else, though.
Comment #9
stella CreditAttribution: stella commentedPatch re-roll, thanks Arancaytar for the review!
Comment #10
Dries CreditAttribution: Dries commentedPlease add a test for this to actions.test. Thanks!
Comment #11
stella CreditAttribution: stella commentedMarking as postponed as it's currently not possible to configure multiple actions in test cases because simpletest is unable to handle multiple forms on the same page all with the same submit button value. The admin/build/trigger/comment page is one such page. I created a patch to address this issue in simpletest in #421084: Allow drupalPost() to specify what form_id to submit to if multiple, so marking as postponed until that's committed.
Also, don't you think it might be better to add those tests to comment.test as it is the comment module that defines them? Failing that in trigger.test as that's currently where the node level actions are tested?
Comment #12
leoklein CreditAttribution: leoklein commentedThank you so much for the D6 version! Just what I needed.
Comment #13
EvanDonovan CreditAttribution: EvanDonovan commentedThanks so much for the D6 version. This seems to me to be more of a bug report than a feature request, since it seems like a strange omission from the list of actions.
Is this still postponed for D7, and can it still be considered even though Sept. 7 has passed? It would be a shame to have to keep patching this in or else add it in a custom module.
Comment #14
sunWe badly need this.
Tagging.
Regarding tests, please see #582316: Add tests for actions. It makes no sense to hold off this patch, because we have no tests and especially no pattern for tests for actions yet.
Comment #15
moshe weitzman CreditAttribution: moshe weitzman commentedcode and docs look great to me
Comment #16
sun'description' is 'label' now.
Did I mark #582316: Add tests for actions as critical bug report? Yes, I did. ;)
Comment #17
sunAlso, please make sure before committing this:
I see no reason for why this patch could kill 12,000+ tests, so I hope the new patch will do better.
Comment #18
sunBetter title. Last patch also passed tests properly now.
Comment #19
sunTagging absolutely critical clean-ups for D7. Do not touch this tag. Please either help with this or one of the other patches having this tag.
Comment #21
sunRe-rolled against latest HEAD.
Comment #22
webchickYeah. I agree with kicking tests to another issue, given the point in the release cycle we're at now. It's completely silly that this action isn't there, given that unpublish is. Hope to see some of you in the actions.inc test issue!
Committed to HEAD. Please document this in the D6 => D7 module upgrade guide, so contrib modules that are currently offering their own know they can remove them.
Comment #23
sun.
Comment #24
EvanDonovan CreditAttribution: EvanDonovan commentedThanks, sun for advocating for this & webchick for committing it! Would it be too much to ask for this to be backported to D6? If it is, I can just continue patching it in each time a minor version upgrade comes out.
Comment #25
joetsuihk CreditAttribution: joetsuihk commentedsub
is #21 patch ready to back port to D6?
Comment #26
andypostTests already in and a bit tuned at #699596: (Un)publishing several comments doesn't work
Comment #27
andypostHere's a backport of #21 for D6
I think it's a bug and also great fix for docs!
Comment #28
joetsuihk CreditAttribution: joetsuihk commentedre#27
publish comment appears on "action" "view bulk operation", "rules"
and tested in "view bulk operation", so i think it behaves correctly. Thanks for the patch!
maybe left next tester to mark this "reviewed and tested"?
Comment #29
Encarte CreditAttribution: Encarte commentedsubscribe
Comment #30
nileshgr CreditAttribution: nileshgr commented#27,
Your patch is good, but I was unable to apply it with just one command.
I had to split into two patch files and then apply each individually. :(
Comment #31
andypost@nilesh.3892 do you patch against current CVS? I've tested this and patch still cleanly applies
Could someone confirm and RTBC this
Comment #32
nileshgr CreditAttribution: nileshgr commentedI patched it against D6.16
Comment #33
andyposttested against 6.16 and it's fine
Comment #34
nileshgr CreditAttribution: nileshgr commentedWhat patch command did you issue ?
Comment #35
andypostAs always http://drupal.org/patch/apply
Comment #36
nileshgr CreditAttribution: nileshgr commentedHmm, I think I missed that -p0
Comment #37
andypostSo could you RTBC this? or we need more reviews?
Comment #38
nileshgr CreditAttribution: nileshgr commentedIts working with -p0.
Comment #39
nileshgr CreditAttribution: nileshgr commentedComment #40
Gábor HojtsyOh, great, thanks, committed.
Comment #41
sunDoes anyone have VBO installed and is already using VBO's comment publish action? To my knowledge, VBO is the only contrib module that provides the missing action.
I didn't test updating to 6.x-dev + VBO myself yet, and can only hope that we didn't break anything with this commit.
I hope that someone else is able to test and report back -- hopefully before 6.17 is released.
Comment #42
nileshgr CreditAttribution: nileshgr commentedI am using VBO, but it didn't provide the action by default. I had to apply the patch.
Comment #43
joetsuihk CreditAttribution: joetsuihk commentedre@42 agreed. VBO is the org. point where i find this thread and fixed by apply patch.
Comment #46
aleksey.tk CreditAttribution: aleksey.tk commentedI'm wondering why you're not updating node_comment_statistics on comment publish/unpublish actions? Current behavior breaks many things if you use this actions in Rules like unpublish comment after 30 days (just an example) - node comment statistics is not updated and you have outdated info in your blocks, node objects, etc.
Update: checked latest alpha of Drupal 7, functionality is the same. Am i the only one who see this problem?
Comment #47
gregglesBetter title and version. We should fix in 7.x first and then port back.
Comment #48
moshe weitzman CreditAttribution: moshe weitzman commentedoops - wrong issue. deleted
Comment #49
Steven Jones CreditAttribution: Steven Jones commented@cyberpunk No, you're not the only one. Should be a fairly simple patch. Will need tests too.
Comment #50
Steven Jones CreditAttribution: Steven Jones commentedHere's a patch that adds the needed calls to the actions, needs tests, and testing.
Comment #51
andypostCode-comment should end with comma
Comment #52
Steven Jones CreditAttribution: Steven Jones commentedActually should be a full-stop instead of the colon.
Comment #57
EvanDonovan CreditAttribution: EvanDonovan commentedDidn't realize this still needed reviews. Thanks comment spam for reminding.
Comment #58
EvanDonovan CreditAttribution: EvanDonovan commentedFixed tags.
Comment #59
Tor Arne Thune CreditAttribution: Tor Arne Thune commentedComment #60
Tor Arne Thune CreditAttribution: Tor Arne Thune commentedComment #61
Tor Arne Thune CreditAttribution: Tor Arne Thune commented*sigh*
Comment #62
kongoji CreditAttribution: kongoji commentedHi, this is a sort of backport of #50 patch for Drupal 6
Comment #63
andypostIs this still valid?
Comment #64
alansaviolobo CreditAttribution: alansaviolobo commentedI believe the tags need to be updated.