Approved/rejected/pending suggested edits by the given user

1

Please login or register to vote for this query.

(click on this box to dismiss)

Web Applications

Q&A for power users of web applications

---use appr=0 to get the edits which have not been approved yet
---use rej=0 to get the edits which have not been rejected yet
---so appr=0&rej=0 means the pending edits
SELECT
  OwnerUserId AS [User Link], Comment,
  'site://suggested-edits/'+CAST(Id AS varchar) AS [Suggested Edit],
  PostId AS [Post Link],
  CreationDate, ApprovalDate, RejectionDate,
CASE
  WHEN ApprovalDate IS NOT NULL THEN 'Approved'
  WHEN RejectionDate IS NOT NULL THEN 'Rejected'
  WHEN ((ApprovalDate IS NULL) AND (RejectionDate IS NULL)) THEN 'Pending'
END
FROM SuggestedEdits
WHERE
  (OwnerUserId=##userid##) AND
  (((##appr?0##=1) AND (ApprovalDate IS NOT NULL)) OR
  ((##rej?1##=1) AND (RejectionDate IS NOT NULL)) OR
  ((##appr##=0) AND (ApprovalDate IS NULL) AND (##rej##=0) AND (RejectionDate IS NULL)))

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results