Skip to content

Instantly share code, notes, and snippets.

@tdalon
tdalon / JiraEpics.pq
Created August 8, 2023 10:08
Import Jira Epics with PowerQuery
let
JiraRootUrl = getNamedCellValue("JiraRootUrl"),
ProjectKey = getNamedCellValue("ProjectKey"),
Source = Json.Document(Web.Contents(JiraRootUrl & "/rest/api/2/search?jql=project=" & ProjectKey & " AND issuetype = Epic AND labels in ('process_improvement')")),
issues = Source[issues],
#"Converted to Table" = Table.FromList(issues, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", { "fields","key"}, { "Column1.fields","EpicKey"}),
#"Expanded Column1.fields" = Table.ExpandRecordColumn(#"Expanded Column1", "Column1.fields", {"customfield_10104"}, {"Epic Name"})
in
#"Expanded Column1.fields"
@tdalon
tdalon / Jira_EditEpic.ahk
Last active July 28, 2023 14:40
Jira Quick Set Epic with AutoHotkey
Jira_EditEpic(IssueKey, EpicKey:="", EpicLinkCfId:="") {
; suc := Jira_EditEpic( IssueKey, EpicKey, EpicLinkCfId:="")
JiraRootUrl := Jira_IssueKey2RootUrl(IssueKey)
If (EpicLinkCfId ="") {
EpicLinkCfId := Jira_GetCfId(JiraRootUrl,"Epic Link")
}
If (EpicKey ="") {
EpicKey := Jira_IssueKey2EpicKey(IssueKey,"",JiraRootUrl)
}
@tdalon
tdalon / ListView_Select.ahk
Last active August 22, 2024 03:16
Dynamic ListView with Search box to filter supporting wildcard syntax
; ListView with Search by wildcard
; Selection := ListView_Select(LVArray,Title:="",Name)
; LVArray: can be multidimensional array, each row matching a ListView row
; Name : Column Names separated by |
ListView_Select(LVArray,Title:="", Name := "Name")
{
static LVSSearchValue
static LVSListView
Gui, ListView_Select:New,,%Title%
@tdalon
tdalon / GetCellNamedValue.pq
Last active July 17, 2023 17:06
Excel PowerQuery: Get Cell Named Value
(CellName as text) =>
let
Source = Excel.CurrentWorkbook(){[Name=CellName]}[Content],
Value = Source{0}[Column1]
in
Value
@tdalon
tdalon / Confluence_PersonalizeMention.ahk
Created July 6, 2023 14:39
AutoHotkey: Confluence: Personalize mention
Confluence_PersonalizeMention() {
If GetKeyState("Ctrl") {
Run, "https://tdalon.blogspot.com/2023/07/confluence-personalize-mentions.html"
return
}
ClipboardBackup := Clipboard
SendInput {Ctrl down}{Shift down}{Left}
SendInput {Ctrl up}{Shift up}
sClip := Clip_GetSelection(False)
@tdalon
tdalon / Jira.ahk
Last active October 19, 2024 16:02
Extract of AutoHotkey Library for Jira REST API
; ----------------------------------------------------------------------
Jira_Get(sUrl,sPassword:=""){
; Syntax: sResponseText := Jira_Get(sUrl,sPassword*)
; sPassword Password for server or Api Token for cloud
; Calls: Jira_BasicAuth
If !RegExMatch(sUrl,"^http") ; missing root url or default url
sUrl := Jira_GetRootUrl() . sUrl
sAuth := Jira_BasicAuth(sUrl,sPassword)
@tdalon
tdalon / Jira.bas
Created June 20, 2023 14:29
Jira Excel VBA Basic functions
' Password can be stored in %userprofile%/JiraPassword.txt (see GetPassword function) to avoid being prompted each time
Private pJiraClient As WebClient
Private pJiraPassword As String
Private pJiraRootUrl As String
Private pJiraUserName As String
Private Property Get JiraPassword() As String
@tdalon
tdalon / Delete_Hidden_Rows.bas
Created June 19, 2023 11:48
VBA Macros to Add multiple Links to Jira Issues via R4J Excel Add-In
Sub Delete_Hidden_Rows()
Dim myU As Range
Dim myR As Range
Dim R As Range
Set R = ActiveSheet.UsedRange
For Each myR In R.Rows
If myR.Hidden Then
If Not myU Is Nothing Then
@tdalon
tdalon / OpenLink.ahk
Created June 16, 2023 12:53
Open link with specific browser with AutoHotkey
@tdalon
tdalon / Jira_AddLinks.ahk
Created June 14, 2023 16:45
Add multiple Links to Jira issue(s) with AutoHotkey