mirror of
https://github.com/Threnklyn/jira.git
synced 2026-06-03 19:48:28 +02:00
adding "comment" command
This commit is contained in:
+12
-10
@@ -248,17 +248,19 @@ func (c *Cli) editTemplate(template string, tmpFilePrefix string, templateData m
|
||||
} else {
|
||||
edited = fixed.(map[string]interface{})
|
||||
}
|
||||
|
||||
mf := templateData["meta"].(map[string]interface{})["fields"]
|
||||
f := edited["fields"].(map[string]interface{})
|
||||
for k, _ := range f {
|
||||
if _, ok := mf.(map[string]interface{})[k]; !ok {
|
||||
err := fmt.Errorf("Field %s is not editable", k)
|
||||
log.Error("%s", err)
|
||||
if promptYN("edit again?", true) {
|
||||
continue
|
||||
|
||||
if _, ok := templateData["meta"]; ok {
|
||||
mf := templateData["meta"].(map[string]interface{})["fields"]
|
||||
f := edited["fields"].(map[string]interface{})
|
||||
for k, _ := range f {
|
||||
if _, ok := mf.(map[string]interface{})[k]; !ok {
|
||||
err := fmt.Errorf("Field %s is not editable", k)
|
||||
log.Error("%s", err)
|
||||
if promptYN("edit again?", true) {
|
||||
continue
|
||||
}
|
||||
return err
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user