Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If you edit an issue directly, not via a followup comment, the next real comment gets "blamed" for all corresponding metadata changes. See http://drupal.org/node/176015#comment-701681 for an example. I'm not sure what, if anything, we could do about this. Definitely minor, but I wanted to submit it in case hunmonk or others had bright ideas at some point in the future. ;)
Comment | File | Size | Author |
---|---|---|---|
#13 | pi_yank_validate.patch | 1.37 KB | hunmonk |
#11 | project_issue_issue_edit_213037_11.patch | 3.72 KB | aclight |
#8 | project_issue_issue_edit_213037_8.patch | 13.44 KB | aclight |
#7 | project_issue_issue_edit_213037_7.patch | 12.48 KB | aclight |
#6 | project_issue_issue_edit_213037_6.patch | 10.02 KB | aclight |
Comments
Comment #1
keith.smith CreditAttribution: keith.smith commentedHeh. This happened to me recently at http://drupal.org/node/212375#comment-699188. I was *very* confused for a bit.
Comment #2
webchickShhh!! Don't get me in trouble with dww! Sheesh! ;)
Hm. Apart from suppressing the message unless the diff happened on /comment/ form submission (check form ID of referring form?), I don't really know.
Or, can't it diff to the current state of the node, rather than the last state of a comment?
I should probably stfu and read the code, but I'm juggling things atm.
Comment #3
hunmonk CreditAttribution: hunmonk commentedi'd actually prefer to prevent editing of the metadata on issue node edit altogether, either via validation or hiding the form fields
Comment #4
leop CreditAttribution: leop commentedStill, if it is the last comment being edited, it doesn't pose a problem. It would be great if a user can edit his own comment or issue, including metadata, as long as no follow-up is posted.
Comment #5
hunmonk CreditAttribution: hunmonk commented@leo_pape: this was rejected because it made the metadata diffing code more complicated and error prone. think of the metadata changes like a CVS commit -- you don't go hacking a CVS commit when you made a mistake, you make another commit to fix it. this 'only-forward' approach is also the best for the metadata, especially since, just like CVS, you can never be guaranteed that your 'last' comment is still the last comment, because others can comment to the issue.
this really needs to be fixed as i suggested above, so that initial issue metadata behaves like the current comment metadata upon edit.
Comment #6
aclight CreditAttribution: aclight commentedLet's try this on for size.
Comment #7
aclight CreditAttribution: aclight commentedEven better, with phpdoc
Comment #8
aclight CreditAttribution: aclight commentedWith project_issue_update() removed.
Comment #9
hunmonk CreditAttribution: hunmonk commentedcommitted to 5.x-2.x. setting back to active until this is deployed on d.o et. all
Comment #10
aclight CreditAttribution: aclight commentedMarking to critical due to a bug when a user who is not uid=1 attempts to edit the issue and is not allowed to.
This happens in the project_issue_issue_nodeapi() function in the following code:
Comment #11
aclight CreditAttribution: aclight commentedThis patch is even simpler than it looks. The first hunk is really just rewriting some conditional statements to not be so obtuse. The second hunk is just indenting the code into an if clause. I tested this as uid=1 and a site admin that can edit nodes and it works properly in both cases.
Comment #12
hunmonk CreditAttribution: hunmonk commentedfrom the code comment for the status validation:
do we need that check given that metadata fields are only displayed on new issue nodes?
Comment #13
hunmonk CreditAttribution: hunmonk commentedwe don't even need this validate case. it's cruft from pre-fapi days. the project_issue_status() function already limits the status dropdown to the statuses that the user can set, and fapi handles validation from there.
Comment #14
dwwno. in addition to those perms, each status has a setting to toggle if the original issue poster can always set that status, regardless of other perms.
Comment #15
dwwsorry, cross post -- that 'no' was relative to #12, not #13. but i haven't looked closely at the patches, so i'm not sure where we stand, i'm just talking about how project_issue "works" regarding all these permissions.
Comment #16
aclight CreditAttribution: aclight commentedCode looks fine, and functionality works with admin and regular users and verified that the "author may set" stuff still works as it should as well.
Comment #17
aclight CreditAttribution: aclight commentedCommited in #104539 and deployed on drupal.org and project.drupal.org.
Comment #18
aclight CreditAttribution: aclight commentedActually, it was http://drupal.org/cvs?commit=104696 where this was finally fixed.
Comment #19
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.