gitoria

tickets

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitf04afc43f04afc43tickets: MdEditor from components 59704ce (a file manager copy still attaches, pipe rows, tickets#49)mref04afc43/tests/oldstore.hl

3.9 KB

  1. // tests/oldstore.hl — the gate's LEGACY FIXTURE for ticket #20: a store as it was BEFORE projects were own
  2. // data — projects `{ name, created }`, tickets that name their project by NAME (path '<name>/<number>'),
  3. // the old state names, events with free-text authors — written straight into the mpackdb tables, exactly the
  4. // record shapes the pre-#20 store.hl wrote. The app's migrate.hl (run at every start) must turn it into
  5. // projects with ids, members and the new states.
  6. //
  7. // TICKETS_STORAGE=/abs/dir bin/hybriel tests/oldstore.hl (writes <dir>/{projects,tickets,events}.db)
  8. //
  9. // old #1 alpha created T in progress, 3 events (the comment and the state change share one ms)
  10. // old #3 alpha (alpha #2) created T+2min awaiting creator, 2 events (a Question ticket → pending)
  11. // old #4 alpha (alpha #3) created T+2min open, 1 event
  12. // old #2 beta.example.org created T+1min open, 1 event
  13. // old #5 beta.example.org created T+4min awaiting creator, 1 event (→ review)
  14. // → alpha #1 #2 #3 = old #1 #3 #4; beta.example.org #1 #2 = old #2 #5
  15. import { MPackDB } from 'hl:mpackdb'
  16. import { env } from 'hl:proc'
  17. dir = env('TICKETS_STORAGE')
  18. if (dir == null || !dir.startsWith('/')) { hlError('set TICKETS_STORAGE to an ABSOLUTE directory') }
  19. projects = new MPackDB(file = dir + '/projects.db', primaryKey = '@id', indexes = ['!name'])
  20. tickets = new MPackDB(file = dir + '/tickets.db', primaryKey = '@id', indexes = ['project', 'state', 'source', '!path', '*oldNumber'])
  21. events = new MPackDB(file = dir + '/events.db', primaryKey = '@id', indexes = ['@ticket'])
  22. if (tickets.count() > 0) { hlError('the fixture store is not empty: ' + dir) }
  23. T = 1790000000000
  24. M = 60000
  25. projects.put({ name = 'alpha' created = T })
  26. projects.put({ name = 'beta.example.org' created = T + M })
  27. t1 = tickets.put({ project = 'alpha' number = 1 path = 'alpha/1' oldNumber = 1 subject = 'Legacy alpha one' summary = 'first legacy ticket' state = 'in progress' source = '' created = T updated = T + 5 * M events = 3 })
  28. t2 = tickets.put({ project = 'beta.example.org' number = 1 path = 'beta.example.org/1' oldNumber = 2 subject = 'Legacy beta one' summary = '' state = 'open' source = '' created = T + M updated = T + M events = 1 })
  29. t3 = tickets.put({ project = 'alpha' number = 2 path = 'alpha/2' oldNumber = 3 subject = 'Question: legacy alpha two' summary = 'two' state = 'awaiting creator' source = '' created = T + 2 * M updated = T + 3 * M events = 2 })
  30. t4 = tickets.put({ project = 'alpha' number = 3 path = 'alpha/3' oldNumber = 4 subject = 'Legacy alpha three' summary = 'three' state = 'open' source = '' created = T + 2 * M updated = T + 2 * M events = 1 })
  31. t5 = tickets.put({ project = 'beta.example.org' number = 2 path = 'beta.example.org/2' oldNumber = 5 subject = 'Legacy beta two' summary = 'b2' state = 'awaiting creator' source = '' created = T + 4 * M updated = T + 4 * M events = 1 })
  32. events.put({ ticket = t1 seq = 1 kind = 'created' author = 'creator' text = '' created = T })
  33. events.put({ ticket = t2 seq = 1 kind = 'created' author = 'architect' text = '' created = T + M })
  34. events.put({ ticket = t3 seq = 1 kind = 'created' author = 'creator' text = '' created = T + 2 * M })
  35. events.put({ ticket = t4 seq = 1 kind = 'created' author = 'creator' text = '' created = T + 2 * M })
  36. events.put({ ticket = t5 seq = 1 kind = 'created' author = 'creator' text = '' created = T + 4 * M })
  37. events.put({ ticket = t3 seq = 2 kind = 'comment' author = 'worker' text = 'legacy comment on two' created = T + 3 * M })
  38. events.put({ ticket = t1 seq = 2 kind = 'comment' author = 'worker' text = 'legacy comment on one' created = T + 5 * M })
  39. events.put({ ticket = t1 seq = 3 kind = 'state' author = 'worker' text = 'started' from = 'open' to = 'in progress' created = T + 5 * M })
  40. console.log('oldstore: ' + projects.count() + ' projects, ' + tickets.count() + ' tickets, ' + events.count() + ' events (' + dir + ')')

Branches

Latest commits

  • f04afc43tickets: MdEditor from components 59704ce (a file manager copy still attaches, pipe rows, tickets#49)mre
  • 06599fa0tickets: MdEditor from components b0f1ec2 (a clipboard with text always pastes the text, tickets#49); real Ctrl+V gatemre
  • 2e1b116ftickets: re-vendor Hybriel master acaceaf3 (framework ec8d6c1d): plugins/web patch queue while a page is built, anonymous session cookies refresh; gate waits for the comment editors to draw (W174) and clicks the form editor when it stands still; security gate: main's code runs on its own binary, lazy-session cookie checksmre
  • 361bc0fetickets: re-vendor Hybriel 7a684920 (WIP, not deployed); on Error exits 1 at startup; migrate passes its log by reference; gate checks follow lazy sessions and the 413 refusalmre
  • 8a69999cident#28: /login/callback never signs out the session it finds; a valid code puts the user on the same sessionmre
  • 337e9b21tickets#37: a comment's files are open to everyone who can read the commentmre
  • 1800600ftickets: write the standby service out in full so the boot gate can read the main servicemre
  • 8179d287tickets: standby service on its port plus 10 and a deploy that hands over through it without a gapmre
  • 0398145ctickets: the table grid rule is marked functional for check-thememre
  • 40fddc20tickets takes components e54f83a: tables get thin grey lines from the theme, desktop toolbar stays one row with the Table button, F4 check counts 11 buttonsmre
  • c1b77d61tickets#35: text typed before the editor is built is taken in once by the build (the input handler no longer writes it to the field first, which doubled the first letters); the gate failure shows the surfacemre
  • 32bf1873tickets#35: the gate types right after the load with the CPU slowed, no waitingmre
  • 64ea9ca2tickets#35: text typed into the reply editor before the page has finished starting is kept; the gate types right after loadmre
  • ccd3a327tickets: the security gate expects frame-src to be exactly the ident address (the sign-in frame), still no wildcard or selfmre
  • 4348dbabident#31: the selector's sign-in returns to the page the user started on (return attribute = the login callback with next), gate checkmre
  • 66ef3005Merge branch 'iw-ident-widget'mre
  • bc0ad663tickets: a gap between your name and Log out in the phone header (they touched); gate checks itmre
  • 2f818d46UX2: report, LOG line, e2e fixes, gate pause after loadmre
  • af3ef7c4gate: the legacy state line says progressmre
  • 62480a00tickets#33: a state change with a note is a comment card in the feed (same framework rendering, can be liked, edited, deleted), its state line stands alone; gate checks for a new comment with and without a state change, at once and after a reloadmre