Splunk Search

After integrating Splunk with JIRA, How can I see the list/count of defects created in last 7 days?

cadrija
Path Finder

I have integrated Splunk with JIRA. I want to see the list/count of defects created in last 7 days. I'm picking the created field from JIRA but still, the list is showing both created and updated list/count together. Please help me solve this issue.
My query :-

eventtype=jira  (issuetype="Bug" OR issuetype="Defect")
| spath fields.created
| dedup key sortby - fields.created
| stats count
0 Karma

umar2
New Member

I've done something similar and haven't experienced that issue but try running the count on the actual field as below and add the where clause if you're not using the time range picker on the Search UI.

eventtype=jira  (issuetype="Bug" OR issuetype="Defect") AND fields.created=*
 | spath fields.created
 | dedup key 
 | stats count(fields.created)
 | where fields.created>=relative_time(now(),"-7d@d") 

If fields.created is not in EPOCH then you can use something similar to the line below - you'd put this line in after the dedup.

|strptime(fields.created, "%Y-%m-%dT%H:%M:%S")
0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...