File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -215,6 +215,9 @@ function M.setup_keymaps()
215215 vim .keymap .set (" n" , " go" , function ()
216216 require (" jira.board" ).show_child_issues ()
217217 end , opts )
218+ vim .keymap .set (" n" , " gp" , function ()
219+ require (" jira.board" ).show_parent_issue ()
220+ end , opts )
218221end
219222
220223function M .load_view (project_key , view_name )
@@ -597,6 +600,18 @@ function M.show_child_issues()
597600 M .load_view (state .project_key , " JQL" )
598601end
599602
603+ function M .show_parent_issue ()
604+ local node = helper .get_node_at_cursor ()
605+ if not node or not node .parent then
606+ vim .notify (" Issue does not have a parent or parent not found." , vim .log .levels .WARN )
607+ return
608+ end
609+
610+ state .custom_jql = string.format (' key = "%s" OR parent = "%s"' , node .parent , node .parent )
611+ state .current_query = " Parent & Children of " .. node .parent
612+ M .load_view (state .project_key , " JQL" )
613+ end
614+
600615function M .open (project_key )
601616 -- If already open, just focus
602617 if state .win and api .nvim_win_is_valid (state .win ) then
Original file line number Diff line number Diff line change @@ -412,6 +412,7 @@ function M.render_help(view)
412412 { k = " gw" , d = " Add time" },
413413 { k = " gb" , d = " Checkout/Create Branch" },
414414 { k = " go" , d = " Show Child Issues (Sub-tasks)" },
415+ { k = " gp" , d = " View Parent & Children (JQL)" },
415416 }
416417
417418 local lines = { " " }
You can’t perform that action at this time.
0 commit comments