Skip to content

Instantly share code, notes, and snippets.

@0xPr0xy
Last active February 25, 2016 12:01
Show Gist options
  • Save 0xPr0xy/6c9bce903422a1b726da to your computer and use it in GitHub Desktop.
Save 0xPr0xy/6c9bce903422a1b726da to your computer and use it in GitHub Desktop.
changelog.js
jQuery('table.tickets tbody tr').each(function(){
// get the ticket number
var numberSelector = '.number .list-column-wrapper p';
var numberElem = jQuery(this).find(numberSelector).first();
var number = jQuery(numberElem).text();
// get the summary
var summarySelector = '.summary .list-column-wrapper';
var summaryElem = jQuery(this).find(summarySelector).first();
var summary = jQuery(summaryElem).text();
// get the assignee
var assigneeSelector = '.assigned_to_id .list-column-wrapper';
var assigneeElem = jQuery(this).find(assigneeSelector).first();
var assignee = jQuery(assigneeElem).text();
var logItem = '#' + number + summary + ' (' + assignee + ')';
console.log(logItem);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment