Skip to content

Commit

Permalink
Merge branch 'release/v0.9.0b25'
Browse files Browse the repository at this point in the history
  • Loading branch information
uchidayuichi committed Feb 24, 2016
2 parents be158b4 + 002b3da commit 803c671
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 24 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Migrate your projects from Redmine to [Backlog].
* The Backlog Space's administrator roles.

## Update
* 2016/02/24 0.9.0b25 released
* 2016/02/19 0.9.0b24 released
* 2016/02/18 0.9.0b23 released
* 2016/02/17 0.9.0b22 released
Expand Down Expand Up @@ -261,6 +262,7 @@ Redmineのプロジェクトを[Backlog]に移行するためのツールです
* Backlogの管理者権限

## 更新履歴
* 2016/02/24 0.9.0b25 リリース
* 2016/02/19 0.9.0b24 リリース
* 2016/02/18 0.9.0b23 リリース
* 2016/02/17 0.9.0b22 リリース
Expand Down Expand Up @@ -494,4 +496,4 @@ https://www.backlog.jp/contact/

[Backlog]: http://www.backlog.jp/

[Jar]: https://github.com/nulab/BacklogMigration-Redmine/releases/download/v0.9.0b24/backlog-migration-redmine-0.9.0b24.jar
[Jar]: https://github.com/nulab/BacklogMigration-Redmine/releases/download/v0.9.0b25/backlog-migration-redmine-0.9.0b25.jar
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name := "backlog-migration-redmine"

organization := "com.nulabinc"

version := "0.9.0b24"
version := "0.9.0b25"

scalaVersion := "2.11.6"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import scala.collection.JavaConverters._
import scala.collection.mutable.Set

/**
* @author uchida
*/
* @author uchida
*/
class IssuesActor(conf: R2BConfig, project: Project) extends Actor with R2BLogging {

private val users = Set.empty[Option[User]]
Expand All @@ -40,7 +40,7 @@ class IssuesActor(conf: R2BConfig, project: Project) extends Actor with R2BLoggi
}

private def searchIssues(offset: Int) = {
val params: Map[String, String] = Map("offset" -> offset.toString, "limit" -> Redmine.ISSUE_GET_LIMIT.toString, "project_id" -> project.getId.toString, "status_id" -> "*")
val params: Map[String, String] = Map("offset" -> offset.toString, "limit" -> Redmine.ISSUE_GET_LIMIT.toString, "project_id" -> project.getId.toString, "status_id" -> "*", "subproject_id" -> "!*")
val issues: Seq[Issue] = redmineService.getIssues(params)
issues.foreach(collectUsers)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class IssuesActor(conf: R2BConfig, project: Project) extends Actor with R2BLoggi
}

private def search(offset: Int) = {
val params: Map[String, String] = Map("offset" -> offset.toString, "limit" -> Redmine.ISSUE_GET_LIMIT.toString, "project_id" -> project.getId.toString, "status_id" -> "*")
val params: Map[String, String] = Map("offset" -> offset.toString, "limit" -> Redmine.ISSUE_GET_LIMIT.toString, "project_id" -> project.getId.toString, "status_id" -> "*", "subproject_id" -> "!*")
val issues: Seq[Issue] = redmineService.getIssues(params)
issues.foreach(output)
}
Expand All @@ -49,7 +49,7 @@ class IssuesActor(conf: R2BConfig, project: Project) extends Actor with R2BLoggi
val users: Seq[User] = redmineService.getUsers

IOUtil.output(ConfigBase.Redmine.getIssuePath(project.getIdentifier, searchIssue.getId), RedmineMarshaller.Issue(issue, project, users))
AttachmentDownloader.issue(conf.redmineKey, project.getIdentifier,issue)
AttachmentDownloader.issue(conf.redmineKey, project.getIdentifier, issue)

count += 1
info(Messages("message.execute_redmine_issue_export", project.getName, count, allCount))
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/com/nulabinc/r2b/conf/ConfigBase.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import java.io.File
object ConfigBase {
val LOG_APPLICATION_LABEL = "[R2B]"
val NAME: String = "Backlog Migration for Redmine"
val VERSION: String = "0.9.0b24"
val VERSION: String = "0.9.0b25"

val root = new File(".").getAbsoluteFile.getParent
val R2B_ROOT = root + "/backlog-migration-redmine"
Expand Down
10 changes: 2 additions & 8 deletions src/main/scala/com/nulabinc/r2b/domain/Redmine.scala
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,7 @@ case class RedmineJournalDetail(property: String, name: String, oldValue: Option

case class RedmineAttachment(
id: Int,
fileSize: Long,
fileName: String,
contentType: String,
description: String,
contentURL: String,
author: Int,
createdOn: String)
fileName: String)

case class RedmineWikiPage(
title: String,
Expand Down Expand Up @@ -156,7 +150,7 @@ object RedmineJsonProtocol extends DefaultJsonProtocol {
implicit val RedmineProjectFormat = jsonFormat3(RedmineProject)
implicit val RedmineIssueStatusFormat = jsonFormat2(RedmineIssueStatus)
implicit val RedmineIssueStatusesWrapperFormat = jsonFormat1(RedmineIssueStatusesWrapper)
implicit val RedmineAttachmentFormat = jsonFormat8(RedmineAttachment)
implicit val RedmineAttachmentFormat = jsonFormat2(RedmineAttachment)
implicit val RedmineWikiPageFormat = jsonFormat8(RedmineWikiPage)
implicit val RedmineCustomFieldFormat = jsonFormat5(RedmineCustomField)
implicit val RedmineJournalDetailFormat = jsonFormat4(RedmineJournalDetail)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,7 @@ object RedmineMarshaller {
private def getRedmineAttachment(attachment: Attachment): RedmineAttachment =
RedmineAttachment(
id = attachment.getId,
fileSize = attachment.getFileSize,
fileName = attachment.getFileName,
contentType = attachment.getContentType,
description = attachment.getDescription,
contentURL = attachment.getContentURL,
author = attachment.getAuthor.getId,
createdOn = new DateTime(attachment.getCreatedOn).toString(timestampFormat))
fileName = attachment.getFileName)

private def getRedmineCustomField(customField: CustomField): RedmineCustomField =
RedmineCustomField(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class RedmineService(conf: R2BConfig) extends R2BLogging {
val redmine: RedmineManager = RedmineManagerFactory.createWithApiKey(conf.redmineUrl, conf.redmineKey)

def getIssuesCount(projectId: Int): Int = {
val url = conf.redmineUrl + "/issues.json?limit=1&project_id=" + projectId + "&key=" + conf.redmineKey + "&status_id=*"
val url = conf.redmineUrl + "/issues.json?limit=1&subproject_id=!*&project_id=" + projectId + "&key=" + conf.redmineKey + "&status_id=*"
val str: String = httpGet(url)
val redmineIssuesWrapper: RedmineIssuesWrapper = JsonParser(str).convertTo[RedmineIssuesWrapper]
redmineIssuesWrapper.total_count
Expand Down

0 comments on commit 803c671

Please sign in to comment.