Advertisement
Guest User

Untitled

a guest
May 25th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. if bug_status went to IN BACKLOG
  2. then bug_status went to ASSIGNED
  3. and this happened 2016-03-01 to 206-03-31
  4. then consider valid record
  5.  
  6. set @BugID = 64252;
  7.  
  8. select
  9. bugs_activity.bug_id,
  10. -- profiles.realname,
  11. -- profiles.login_name,
  12. bugs_activity.bug_when,
  13. fielddefs.name,
  14. bugs_activity.added
  15. -- bugs_activity.removed
  16. from
  17. bugs_activity,
  18. profiles,
  19. fielddefs
  20.  
  21. -- Real world 'Where xx' will have more logic and result in a number of bugzilla records
  22. -- Each bugzilla record has its own 'bugs_activity'
  23. -- Logic needs to look at each buzilla records historyto filter results
  24. -- Want to end up with a filtered record set and a total number of records
  25. Where bug_id = @BugID AND bugs_activity.who = profiles.userid AND bugs_activity.fieldid = fielddefs.id
  26.  
  27. bug_id bug_when name added
  28. 64252 26/01/2016 6:51:30 AM status_whiteboard ID:103138574
  29. 64252 26/01/2016 6:52:10 AM cc xxx@abc.com
  30. 64252 28/01/2016 9:49:10 AM bug_status IN BACKLOG
  31. 64252 28/01/2016 9:49:10 AM cf_escalation_notes Effort: 2
  32. Reproduced by support
  33. 64252 28/01/2016 9:49:10 AM assigned_to def@abc.com
  34. 64252 2/05/2016 4:33:05 PM bug_status ASSIGNED
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement