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!

.conf25 technical session recap of Observability for Gen AI: Monitoring LLM ...

If you’re unfamiliar, .conf is Splunk’s premier event where the Splunk community, customers, partners, and ...

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to Officially Supported Splunk ...