| | |
| | | for(int i = 0; i < databases.size(); i++) |
| | | { |
| | | Repository db = databases.get(i); |
| | | RepositoryModel model = models.get(i); |
| | | try { |
| | | // Collect the set of all json files |
| | | File dir = new File(db.getDirectory(), TICKETS_PATH); |
| | |
| | | long ticketId = Long.parseLong(tid); |
| | | List<Change> changes = TicketSerializer.deserializeJournal(json); |
| | | if (ArrayUtils.isEmpty(changes)) { |
| | | log.warn("Empty journal for {}:{}", models.get(i), journal); |
| | | log.warn("Empty journal for {}:{}", model, journal); |
| | | continue; |
| | | } |
| | | TicketModel ticket = TicketModel.buildTicket(changes); |
| | | ticket.project = models.get(i).projectPath; |
| | | ticket.repository = models.get(i).name; |
| | | ticket.project = model.projectPath; |
| | | ticket.repository = model.name; |
| | | ticket.number = ticketId; |
| | | |
| | | // add the ticket, conditionally, to the list |
| | |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("failed to deserialize {}/{}\n{}", |
| | | new Object [] { models.get(i), journal, e.getMessage()}); |
| | | new Object [] { model, journal, e.getMessage()}); |
| | | log.error(null, e); |
| | | } |
| | | } |