searching a specific issue type within an issuelink jira - jira

I am using jira and I am trying to find features and enablers which have the issuelinktype "relates to" however within this I am trying to narrow down those that have the above issuelinktype but those linked issues are of the Objective issue type.
below is some pseudo-query
SELECT * feature
WHERE issuelinktype="relates to"
AND issue link type target = "objective"
I have tried applying in statements and other traditional SQL syntax however these do not appear within JQL
I also have not tried any plug ins or other API's that could attach to Jira as I do not have access to them.

You can use the query:
issueFunction in linkedIssuesOfAll("subquery", "relates to") And type = "objective"
The subquery is related to the linked issue with the link (if you write in the subquery "type = Epic" it will return all the issues that have linktype "relates to" to Epics").
The rest of the query is for the issue that you want the query return.

Related

JQL for getting all epics related to an epic and all stories created under that epic

What I'm trying to do.
We have board which contains an Epic. Lets say the key of this epic is "MY-01".
Now, I have another epic on a different board with key : "AOB-01".
Under epic "AOB-01" I have created story: AOB-03 and AOB-04.
Now I want a JQL which gives me all issues related to MY-01 AND the children of all issues created under that link.
I have used:
issue in linkedIssues(MY-01, "relates to") to get all epics under MY-01.
Then I have:
issue in childIssuesOf("AOB-01") to get all stories (in this case AOB-03 and AOB-04).
But I cannot get a JQL which combines these two.
Can anyone help me out?
Regards,
Barry
If you want to combine 2 JQL queries you can use the operator "AND":
issue in linkedIssues(MY-01, "relates to") AND issue in childIssuesOf("AOB-01")

Querying JIRA to Produce Counts of Issues by Different Type

Suppose I have the following JIRA filter.
project = XXX AND resolution = Unresolved AND assignee in (EMPTY) ORDER BY Type asc, priority desc
I use it to see all unassigned issues in a certain project and pull from for triage.
Every now-and-then, I need to know how many are in each Type, i.e., I actually want a count for each.
How could I modify this query to do that or write a new one that accomplishes the same thing?
Remember that JQL isn't SQL - it just operates on tickets and returns lists of them for other parts of JIRA to consume, and doesn't really have a mechanism for counting results.
That said, you can use the JIRA REST API's /search endpoint along with maxResults=0 to construct JQL queries for each Type you care about, and the endpoint will give you a total value for that ticket Type:
https://jira.url/rest/api/latest/search?jql=project%20=%20XXX%20AND%20resolution%20=%20Unresolved%20AND%20assignee%20in%20%28EMPTY%29%20AND%20Type%20=%20Task&maxResults=0
Results in this output for Type=Task:
{
"startAt":0,
"maxResults":0,
"total":123,
"issues":[]
}

How to query for work items for current team in TFS?

I am getting started with TFS 2015 and I need to know how to make a query that returns all of the work items for the current iteration for the current team. I have Iteration Path Under #CurrentIteration and Work Item Type = User Story, but I can find a macro similar to #CurrentIteration that would get the current team or team area. How do I filter out the stories for all other teams?
It's not able to do this through a query. You could check the Query macros or variables, use the macros described in the following table to filter your queries based on specific fields. There is not any team area related macro.
Besides, actually as far as I know work items can only be assigned to specific people not groups. However, for a workaround. By assigning a work item to a specific area path you basically assign it to a team. If you use the area path for something else today, you can also use another string field in the work item that specifies the team.
(https://www.visualstudio.com/docs/work/scale/portfolio-management)
So you could use Area Path to do the filter.
This won't directly solve your problem but you can use 'Assigned to' 'In Group' and then use a user group e.g. '[Home]\Team NI'. This will return tickets assigned to the group or group members but assumes the tickets are assigned appropriately (rather than being unassigned). YMMV but I've found it useful at times to get around this limitation. TFS Azure 2019 now also includes #TeamAreas - which is helpful unless you have multiple teams using the same areas.

how can i search by name in CompanyCurrency table in Quickbooks online api

When i try to query this " Select Name from CompanyCurrency" i get this error
Error
And If i Query by Code i get a result like this (Select Code from CompanyCurrency):
Results by selecting the name
Well , i don't know why is this happening because both code and name are properties in the table , any way i wanted to skip this issue by searching on the code so i've did the search query using like operator and it faults even the same query on all the other tables on the quickbooks online works fine .
any one knows the issue that related with this table ?
I don't think you can filter the results of that query. Looking at the Manage multiple currencies docs like they do on other endpoints, it doesn't list any fields as filterable. You should retrieve the list and just select the one you need in your code.

Dynamics CRM OData query filtering on expanded attributes only works if no results come out?

I have a requirement to fetch Price List Item records which adhere to the following requirements:
Filter by a specific PriceList
Filter by a specific currency
Filter by the Name of the related Product containing a given string
I got the first two points working no problem, but it feels like expanding doesn't cope well with filtering. I started from a "straight" query on Product entity:
.../ProductSet?$filter=substringof('sometext', Name)
Equivalent SQL (targeting the corresponding CRM filtered views for clarity):
SELECT * FROM FilteredProduct WHERE ProductNumber LIKE '%sometext%'
The above query works, I can tweak it and have no issues. However, if I attempt to move on to ProductPriceLevel (thus expanding the relationship with Product, which is product_price_levels) I end up with this:
.../ProductPriceLevelSet?$expand=product_price_levels&$filter=substringof('sometext', product_price_levels/Name)
Equivalent SQL (again, targeting the relevant filtered views):
SELECT * FROM FilteredProductPriceLevel PPL JOIN FilteredProduct P
ON PPL.ProductId = P.ProductId WHERE P.ProductNumber LIKE '%sometext%'
Which has two different outcomes I see:
If the $filter has no matches, it works fine and returns an empty result set
If the $filter matches something, I get an error
code: -2147220970
message: The result selector of the 'Join' operation must return an anonymous type of two properties.
AFAIK that's what happens when you hit a limitation of LINQ-to-CRM regarding using .Where() on multiple entities at once... doesn't seem relevant!
What's wrong with my query ?
NOTE: The CRM 2013 I'm using is On-Premise, without any update rollup / service pack.
ALSO NOTE: The equivalent SQL, as can be expected, works perfectly
I don't think CRM OData supports adding a filter on a joined entity. Try reversing the entity you're actually starting with, and add a path to the referencing entity:
ProductSet()?$filter=substringof('sometext',ProductNumber)&$expand=product_price_levels&$select=product_price_levels/*
P.S. If you have linqPad, this is the query I used to generate this:
from p in ProductSet
where p.ProductNumber.Contains("sometext")
select new { p.product_price_levels }

Resources