aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/jira/import.go
diff options
context:
space:
mode:
authorSteve Moyer <smoyer1@selesy.com>2022-08-23 10:33:19 -0400
committerSteve Moyer <smoyer1@selesy.com>2022-08-23 10:33:19 -0400
commit7ba98bfadc2c4c7fd3e777074976b78d6171b163 (patch)
tree4865a84837a016e9a18b566046a2aa7a1992acc7 /bridge/jira/import.go
parent2c2c449187557384fd1e5b9333e808451be86041 (diff)
parent5a70e8b3a2e0fe3d1a1dcd4c24bb6bf64633cb7f (diff)
downloadgit-bug-7ba98bfadc2c4c7fd3e777074976b78d6171b163.tar.gz
Merge branch 'master' into fix-850-ineffective-comment-edit
Diffstat (limited to 'bridge/jira/import.go')
-rw-r--r--bridge/jira/import.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/bridge/jira/import.go b/bridge/jira/import.go
index 572c393e..8043acf4 100644
--- a/bridge/jira/import.go
+++ b/bridge/jira/import.go
@@ -11,8 +11,9 @@ import (
"github.com/MichaelMure/git-bug/bridge/core"
"github.com/MichaelMure/git-bug/bridge/core/auth"
- "github.com/MichaelMure/git-bug/bug"
"github.com/MichaelMure/git-bug/cache"
+ "github.com/MichaelMure/git-bug/entities/bug"
+ "github.com/MichaelMure/git-bug/entities/common"
"github.com/MichaelMure/git-bug/entity"
"github.com/MichaelMure/git-bug/entity/dag"
"github.com/MichaelMure/git-bug/util/text"
@@ -269,8 +270,7 @@ func (ji *jiraImporter) ensureComment(repo *cache.RepoCache, b *cache.BugCache,
return err
}
- targetOpID, err := b.ResolveOperationWithMetadata(
- metaKeyJiraId, item.ID)
+ targetOpID, err := b.ResolveOperationWithMetadata(metaKeyJiraId, item.ID)
if err != nil && err != cache.ErrNoMatchingOp {
return err
}
@@ -333,7 +333,7 @@ func (ji *jiraImporter) ensureComment(repo *cache.RepoCache, b *cache.BugCache,
op, err := b.EditCommentRaw(
editor,
item.Updated.Unix(),
- targetOpID,
+ entity.CombineIds(b.Id(), targetOpID),
text.Cleanup(item.Body),
map[string]string{
metaKeyJiraId: derivedID,
@@ -516,7 +516,7 @@ func (ji *jiraImporter) ensureChange(repo *cache.RepoCache, b *cache.BugCache, e
statusStr, hasMap := statusMap[item.To]
if hasMap {
switch statusStr {
- case bug.OpenStatus.String():
+ case common.OpenStatus.String():
op, err := b.OpenRaw(
author,
entry.Created.Unix(),
@@ -530,7 +530,7 @@ func (ji *jiraImporter) ensureChange(repo *cache.RepoCache, b *cache.BugCache, e
}
ji.out <- core.NewImportStatusChange(op.Id())
- case bug.ClosedStatus.String():
+ case common.ClosedStatus.String():
op, err := b.CloseRaw(
author,
entry.Created.Unix(),
@@ -608,8 +608,8 @@ func getStatusMap(conf core.Configuration) (map[string]string, error) {
mapStr, hasConf := conf[confKeyIDMap]
if !hasConf {
return map[string]string{
- bug.OpenStatus.String(): "1",
- bug.ClosedStatus.String(): "6",
+ common.OpenStatus.String(): "1",
+ common.ClosedStatus.String(): "6",
}, nil
}