TFS 2018 tree query - tfs

https://i.stack.imgur.com/VY9Bc.png
How do I edit this query to INclude children items that are completed?

Related

How to filter future records in joined tables in Rails?

I have a query that joins two models and then filters on the basis of response_deadline:
Delivery.joins(:tendering_requests).where(tendering_requests: { response_deadline: 2.days.from_now })
Instead of 2.days.from_now, I want to filter the deliveries where the response_deadlines are after whatever the date and time is right now
Here, response_deadline is a datetime type, for eg, Tue, 31 Jul 2018 10:51:19 EDT -04:00
How can I filter them so that it shows only future deliveries?
If I had just one model I could do something like:
TenderingRequest.where("response_deadline > ?", Time.now) but how to filter when there are two models joined?
As suggested I can do: Delivery.joins(:tendering_requests).where("tendering_requests.response_deadline >= ?",Time.now)
Also, for more ref: Where Clause with Less/Greater than after a Join
Try This:
Delivery.joins(:tendering_requests).where("tendering_requests.response_deadline >= ?",Time.zone.now")

JQL query for Fetch all the jira tickets with status "Pending Merge" and order them by ascending order of status update to this

How to create a JQL query for fetching all the jira tickets with status "Pending Merge" and the first ticket which I get should be the first ticket whose status was changed to "Pending Merge"
what is the jql for that?
JQL--->"status=Pending Merge order by ASC".This query fetches all the tickets with Pending merge status and sorts them by ascending order of Jira-ID.But I want the ticket whose status was changed to Pending merge first to be in the first and so on .
What should the query be for that?
There is no general JQL for that.
Alternative 1:
If the workflow sets the resolution during the transition to "Pending Merge" then you can order by resolution date.
status = "Pending Merge" order by resolved ASC
Alternative 2:
This will order by last updated date. The updated date does also change on other events.
status = "Pending Merge" order by updated ASC
Alternative 3:
You need to use Automation rules or third party Marketplace Apps to save a timestamp in a a customfield during the transition to "Pending Merge".

TFS Reporting Server: Report that shows if work items were bounced from area path to area path

Management wants to be able track workitems that are bouncing between teams. Can we get a report and the number of times a workitem changes area path?
There are probably more elegant ways to accomplish this.
In TFS 2018, assuming you don't have issues directly querying the TFS database, you could run this query against the collection database:
SELECT A.ID, A.REV, A.AreaId, B.ID, B.REV, B.AREAID
FROM vw_WorkItemCoreAll A
JOIN vw_WorkItemCoreAll B
ON B.ID = A.ID
AND B.REV = A.REV-1
WHERE A.ID = {workitemid}
AND A.REV > 1
AND A.AreaId <> B.AreaId
This will pull all work items that have a revision, align to the prior revision, and then pull out any where the area path has swapped. You can add/remove filters or columns as you see fit.

How do I order tickets by ticket name and ticket number in JIRA?

I have a JIRA project AAA and lots of tickets like AAA1, AAA2, AAA3
I'd like to search the tickets ordered by the name and ticket number, so it shows like this:
AAA1
AAA2
AAA3
what key word I should use for the filter?
I tried using 'order by Created', most of the tickets are displayed in order, but the one moved from other project is not in order because in the other project, it was created earlier.
In a JQL query, end the query with :
ORDER BY key

In TFS 2010 how can I search for a value entered into the note during check-in?

We have a Team Project Collection Source Control Setting for Check-in Notes that requires each check-in to capture a "Tracking Number". This number is external to TFS. I need to search for all the changesets that have a specific Tracking number.
The resulting changeset list tells me what to get latest version on, for a monthly deployment.
We don't use Work Items.
Question 1) Where in tfs_default_collection are the notes stored? One way to easily look would be to query with .SQL. I don't see "Note" in any of the database schemas.
Question 2) If I can't use .SQL to search, what object reference in Microsoft.TeamFoundation.VersionControl.Client.dll will give me the details of the Check-in Notes?
If I know what the changeset number is, then I can do something like this to give me the list.
-- these are all the .slq objects checked in $Release on '2013-01-28'
SELECT
chg_set.CreationDate,
chg_set.ChangeSetId,
v.FullPath
FROM dbo.tbl_ChangeSet (nolock)AS chg_set
INNER JOIN dbo.tbl_Version (nolock)AS v ON chg_set.ChangeSetId = v.VersionFrom
LEFT OUTER JOIN dbo.tbl_File (nolock) AS f ON v.FileId = f.FileId
WHERE chg_set.CreationDate >= '2013-01-31'
and FullPath like '%Tracker\Releases\2013.02.31%'
and FullPath like '%.sql%'
ORDER BY chg_set.CreationDate, v.FullPath
After some more digging into TFS_DefaultCollection I found it.
I can join these results with the query above and see exactly what I am looking for.
SELECT ReleaseNoteId, FieldName, BaseValue
from Tfs_DefaultCollection.dbo.tbl_ReleaseNoteDetails
where ReleaseNoteId in (SELECT ReleaseNoteId
FROM Tfs_DefaultCollection.dbo.tbl_ReleaseNote
where DateCreated between '2013-01-18' and '2013-02-22')
and FieldName = 'Tracker #'
and BaseValue <> '0' -- base value of zero is a merge from $Main
Thank you, in advance.

Resources