grim/youtrack-import

9522bfc87d5e
Parents f858379a5b97
Children 367046eff7da
Add output while importing attachments. Fixes YI-6
--- a/youtrack/attachment.go Wed Jan 15 04:43:10 2020 -0600
+++ b/youtrack/attachment.go Wed Jan 15 04:54:44 2020 -0600
@@ -156,10 +156,19 @@
func (c *Client) ImportAttachments(p *Project) error {
for _, issue := range p.Issues {
- for _, attachment := range issue.Attachments {
+ l := len(issue.Attachments)
+ for idx, attachment := range issue.Attachments {
+ fmt.Printf(
+ "importing attachment for issue %d: (%d of %d) ... ",
+ attachment.issue,
+ idx+1,
+ l,
+ )
if err := c.importAttachment(p, attachment); err != nil {
+ fmt.Printf("failed.\n")
return err
}
+ fmt.Printf("done.\n")
}
}