Better PTK integration.
- Now includes the context as a PTK tag (if present). - Add the PIT ID to the PTK notes.
This commit is contained in:
		@@ -1,6 +1,6 @@
 | 
				
			|||||||
# Package
 | 
					# Package
 | 
				
			||||||
 | 
					
 | 
				
			||||||
version       = "4.6.2"
 | 
					version       = "4.7.0"
 | 
				
			||||||
author        = "Jonathan Bernard"
 | 
					author        = "Jonathan Bernard"
 | 
				
			||||||
description   = "Personal issue tracker."
 | 
					description   = "Personal issue tracker."
 | 
				
			||||||
license       = "MIT"
 | 
					license       = "MIT"
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										13
									
								
								src/pit.nim
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								src/pit.nim
									
									
									
									
									
								
							@@ -1,7 +1,7 @@
 | 
				
			|||||||
## Personal Issue Tracker CLI interface
 | 
					## Personal Issue Tracker CLI interface
 | 
				
			||||||
## ====================================
 | 
					## ====================================
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import cliutils, docopt, json, logging, options, os, ospaths, sequtils,
 | 
					import cliutils, docopt, json, logging, options, os, sequtils,
 | 
				
			||||||
  tables, terminal, times, timeutils, unicode, uuids
 | 
					  tables, terminal, times, timeutils, unicode, uuids
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from nre import re
 | 
					from nre import re
 | 
				
			||||||
@@ -404,8 +404,15 @@ Options:
 | 
				
			|||||||
    if ctx.triggerPtk:
 | 
					    if ctx.triggerPtk:
 | 
				
			||||||
      if targetState == Current:
 | 
					      if targetState == Current:
 | 
				
			||||||
        let issue = ctx.tasksDir.loadIssueById($(args["<id>"][0]))
 | 
					        let issue = ctx.tasksDir.loadIssueById($(args["<id>"][0]))
 | 
				
			||||||
        var cmd = "ptk start "
 | 
					        var cmd = "ptk start"
 | 
				
			||||||
        if issue.tags.len > 0: cmd &= "-g \"" & issue.tags.join(",") & "\""
 | 
					        if issue.tags.len > 0 or issue.properties.hasKey("context"):
 | 
				
			||||||
 | 
					          let tags = concat(
 | 
				
			||||||
 | 
					            issue.tags,
 | 
				
			||||||
 | 
					            if issue.properties.hasKey("context"): @[issue.properties["context"]]
 | 
				
			||||||
 | 
					            else: @[]
 | 
				
			||||||
 | 
					          )
 | 
				
			||||||
 | 
					          cmd &= " -g \"" & tags.join(",") & "\""
 | 
				
			||||||
 | 
					        cmd &= " -n \"pit-id: " & $issue.id & "\""
 | 
				
			||||||
        cmd &= " \"" & issue.summary & "\""
 | 
					        cmd &= " \"" & issue.summary & "\""
 | 
				
			||||||
        discard execShellCmd(cmd)
 | 
					        discard execShellCmd(cmd)
 | 
				
			||||||
      elif targetState == Done or targetState == Pending:
 | 
					      elif targetState == Done or targetState == Pending:
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1 +1 @@
 | 
				
			|||||||
const PIT_VERSION* = "4.6.2"
 | 
					const PIT_VERSION* = "4.7.0"
 | 
				
			||||||
		Reference in New Issue
	
	Block a user