So I'm running this search string here:
index = git | rename Data.payload.head_commit.modified{} as FilesModified | rex field=Data.payload.head_commit.message max_match=10 "(?<BugID>[bB]ug.+[^@\w\w\d{4}]\d{3,6})" |rex field=BugID max_match=10 "(?<BugIDs>\d{3,6})"|eval BugIDs = ltrim(BugIDs,"0") | stats values(BugIDs) by FilesModified | rename values(BugIDs) as BugIDs | eval BugCountPerFile = mvcount(BugIDs) | search BugIDs =* | sort by -BugCountPerFile | search "FilesModified" = "*$namespace$*" | search "FilesModified" = "*$file$*"
Basically it mines GIT to get information about bugs per file, and it works great except the format of the columns comes with each BugID on a different row like this:
FilesModified BugID's
source/file.cs 110
8889
556
8521
5485
8889
And the list can get pretty long if there are over 15 bug Id's for one file.
Is there a way to list them like 4 or 5 on a row instead of just one, and seperated by commas or spaces?
Try this
index = git | rename Data.payload.head_commit.modified{} as FilesModified | rex field=Data.payload.head_commit.message max_match=10 "(?<BugID>[bB]ug.+[^@\w\w\d{4}]\d{3,6})" |rex field=BugID max_match=10 "(?<BugIDs>\d{3,6})"|eval BugIDs = ltrim(BugIDs,"0") | stats values(BugIDs) BugIDs by FilesModified delim="," | eval BugCountPerFile = mvcount(BugIDs) | nomv BugIDs | search BugIDs =* | sort by -BugCountPerFile | search "FilesModified" = "*$namespace$*" | search "FilesModified" = "*$file$*"
Try this
index = git | rename Data.payload.head_commit.modified{} as FilesModified | rex field=Data.payload.head_commit.message max_match=10 "(?<BugID>[bB]ug.+[^@\w\w\d{4}]\d{3,6})" |rex field=BugID max_match=10 "(?<BugIDs>\d{3,6})"|eval BugIDs = ltrim(BugIDs,"0") | stats values(BugIDs) BugIDs by FilesModified delim="," | eval BugCountPerFile = mvcount(BugIDs) | nomv BugIDs | search BugIDs =* | sort by -BugCountPerFile | search "FilesModified" = "*$namespace$*" | search "FilesModified" = "*$file$*"
That worked! Thank you!