Jira query is not working in JIRA search? - jql

I am using JIRA version v8.5.9, where I am running the following query in its search option.
issuetype = "bug" AND assigned == 'xyz'
Where xyz is a user. Basically I what I am trying to achieve is: I am looking for sub-tasks for all stories whose assignee is xyz and abc users. When I am running this query it's not giving me any results. Any help is greatly appreciated.

You could use following query in search option: Which will look for all sub-tasks for specific users named xyz, abc.
issuetype = "Sub task" AND assignee in (xyz,abc)
Explanation:
Look for Sub task field first.
Then look for assignees which are multiple in this condition, abc and xyz in your samples.

Related

Splunk query to get user, saved search name, last time the query ran

From Splunk, I am trying to get the user, saved search name and last time a query ran ?
A single Splunk query will be nice.
I am very new to Splunk and I have tried these queries :-
index=_audit action=search info=granted search=*
| search IsNotNull(savedsearch_name) user!="splunk-system-user"
| table user savedserach_name user search _time
The above query , is always empty for savesearch_name.
Splunk's audit log leaves a bit to be desired. For better results, search the internal index.
index=_internal savedsearch_name=* NOT user="splunk-system-user"
| table user savedsearch_name _time
You won't see the search query, however. For that, use REST.
| rest /services/saved/searches | fields title search
Combine them something like this (there may be other ways)
index=_internal savedsearch_name=* NOT user="splunk-system-user"
| fields user savedsearch_name _time
| join savedsearch_name [| rest /services/saved/searches
| fields title search | rename title as savedsearch_name]
| table user savedsearch_name search _time
Note that you have a typo in your query. "savedserach_name" should be "savedsearch_name".
But I also recommend a free app that has a dedicated search tool for this purpose.
https://splunkbase.splunk.com/app/6449/
Specifically the "user activity" view within that app.
Why it's a complex problem - part of the puzzle is in the audit log's info="granted" event, another part is in the audit log's info="completed" event, even more of it is over in the introspection index. You need those three stitched together, and the auditlog is plagued with parsing problems and autokv compounds the problem by extracting all of fields from the SPL itself.
That User Activity view will do all of this for you, sidestep pretty thorny autokv problems in the audit data, and not just give you all of this per search, but also present stats and rollups by user, app, dashboard, even by sourcetypes-that-were-actually-searched
it also has a macro called "calculate pain" that will score a "pain" number for each search, and then sum up all the "pain" in the by-user, by-app, by-sourcetype rollups etc. So that admins can try and pick off the worst offenders first.
it's up on SB here and approved for both Cloud and onprem - https://splunkbase.splunk.com/app/6449/
(and there's a #sideview_ui channel for it in the community slack.)

Finding the query that created a table in BigQuery

I am a new employee at the company. The person before me had built some tables in BigQuery. I want to investigate the create table query for that particular table.
Things I would want to check using the query is:
What joins were used?
What are the other tables used to make the table in question?
I have not worked with BigQuery before but I did my due diligence by reading tutorials and the documentation. I could not find anything related there.
Brief outline of your actions below:
Step 1 - gather all query jobs of that user using Jobs.list API - you must have Is Owner permission for respective projects to get someone else's jobs
Step 2 - extract only those jobs run by the user you mentioned and referencing your table of interest - using destination table attribute
Step 3 - for those extracted jobs - just simply check respective queries which allow you to learn how that table was populated
Hth!
I have been looking for an answer since a long time.
Finally found it :
Go to the three bars tab on the left hand side top
From there go to the Analytics tab.
Select BigQuery under which you will find Scheduled queries option,click on that.
In the filter tab you can enter the keywords and get the required query of the table.
For me, I was able to go through my query history and find the query I used.
Step 1.
Go to the Bigquery UI, on the bottom there are personal history and project history tabs. If you can use the same account used to execute the query I recommend personal history.
Step 2.
Click on the tab and there will be a list of queries ordered from most recently run. Check the time the table was created and find a query that ran before the table creation time.
Since the query will run first and create the table there will be slight differences. For me it stayed between a few seconds.
Step 3.
After you find the query used to create the table, simply copy it. And you're done.

Pentaho Report Designer: Passing list of values as parameters to report

Report Objective: Performance analysis of players by statistics comparison
Desired Report Layout
Please refer to the layout and read on. The player names need to be added from a list which could be anything like entry text box, multicheck box, dropdown etc. If I select Jake Tyler in this list, the report should refresh and show me the statistics from him. Then when I select Adam Smith, he should show up as the next entry below Jake with his respective stats.
I know how to pass individual players as parameters in the query using Pentaho parameters and tagging them in the condition using SQL as:
'where PlayerName = ${playername}'
But I need to know how to pass multiple player names in a similar fashion to generate this report using multivalue String parameters.
Can you please please guide me on how to do this? I have heard things like x-actions which could work but I don't know how to use that. I am sure this will help a lot of people who are trying to achieve something similar which might seem complex to them.
You can simply use where PlayerName IN (${playername}).
The list should be correctly passed from the parameter to query.
and the parameter also should get data correctly.
Eg:
select 'Jake Taylor' as pn
union
select 'Adam Smith' as pn
union
select 'Chris Lawson' as pn
or
select distinct column_name from table_name
this can be sent to parameter (in Add parameter window) and your main query can be prepared as I explained above using IN
NB: You can use only Display types like: Multi value list, Multi selection box etc. Not drop downs which pass only single value.

multiple Filters in Jasper Report

I have Created a Student Information Report using Jasper report (SQL database). I need to filter the report using different parameters. e.g
Branch Wise
Gender Wise
Class Wise
Section Wise and some more
I'm using Java Swing as a front end application.
My question is for each filter i have to write separate query?? or is there a way in jasper to manage different filter for example.
You can manage your query based on the parameter you got using a different expression which is $P!{}.
Follow below steps to achieve your needs,
Create a parameter, say $P{BranchWise}.
In the expression of that parameter, write something like
$P{Branch} != null ? "and branch = '"+$P{Branch}+"'" : ""
Likewise create parameter for different filters.
Now use these parameters in your query as below
select * from table1 where 1=1 $P!{BranchWise} $P!{GenderWise} $P!{ClassWise} ....
Hope this should solve your problem.

Select certain rows from a result set. MS Access VBA

This could be bit complicated. I will try to explain as much as I can.
Say for example i have a table called "Job". In this table there will be multiple entries for a same Job ID (Job ID is not Unique). The current system enables a user to search for a particular Job ID and return all the rows having the same Job ID on a form as shown below:-
Job ID | Item Name | Date Completed | Generate Report?
------------------------------------------------------
JB001 Door 25/12/2012 []
JB001 Window 02/01/2013 []
JB001 Blinds 10/01/2013 []
JB001 Carpets 15/02/2013 []
I would like to implement a feature where a user can select multiple rows from this result set (using the check boxes) and generate another form/report form he selections. For e.g. if the user ticks check boxes next to Window an Blind and then clicks a button, the next form should display these selected rows.
By the way, I am using MS Access.
The problem I am facing is haven't got a clue as to how to implement this i.e to select certain rows from the result set.
Thanks in advance.
Perhaps youre thinking in too much code, could you formulate a query that uses the job ID from a form and the check box as a where condition?
You could base the report off of the query and as long as the form is open when the report is opened the query can use its fields. In the where box type [Forms]![frmFormName]![FieldName]
That should get you started.