Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. def pageManager = ComponentLocator.getComponent(PageManager)
  2. def page = pageManager.getPage('OP','2019-10-09 Meeting notes')
  3. def text_page = page.getBodyAsString()
  4.  
  5. def doc = Jsoup.parse(text_page)
  6. def element = doc.select("td")
  7. def result = element.collect {it.text()}
  8. for (int i = 0; i < result.size(); i = i + 5){
  9. def body = new JsonBuilder([
  10. fields: [
  11. project : [key: "QQ"],
  12. issuetype : [name: "Техническая консультация"],
  13. summary : [result[ i+1]],
  14. description: [result[i+2]],
  15. assignee : [result[i+3]],
  16. priority : [result[i+4]],
  17. customfield_11801 : [result[i+5]]
  18. ]
  19. ]).toString()
  20. }
  21. log.debug(result[1])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement