YouTrack query to retrieve subtasks of Features with given tag - youtrack

Is there a way in YouTrack to run a query to find all the issues which are Subtasks of any "Feature" issue which contains a given tag?
In other words, find all issues with Type: Feature and tag: Foo, then return any issues that are Subtasks of the result.
I'm currently using YouTrack 5.2.5 but happy to upgrade if required.

It's not currently possible to perform such search in YouTrack.
You can only search for Type:Feature tag: Foo and then find subtasks of each found feature with a script or manually.

Related

Search for issues that starts with xxx in Jira

This is my first time working with Jira and their API. My company wants me to fetch all "ASAPSD" issues, but I don't understand how to. The core problem in itself is that I do not understand exactly how Jira works, and how issues are "built" up.
The issue starts with "ASAPSD" followed by some random characters and numbers. For example "ASAPSD-334". How can I, with a GET request, get all issues that start with ASAPSD?
Basic information about Jira and projects
The first part (prefix) is the Project Key representing a project/collection where all similar issues are stored (in this case, ASAPSD may stand for ASAP Service Desk:-). There are certainly more projects in every Jira instance. Some other projects are intended to track different activities.
Searching for the project issues
You can search for any issues using the search function (available also via REST API).
First, log in to the Jira and try to search for the issues manually by yourself - in Issue Navigator (via Issues top menu bar). Here you'll find that you can search all issues via Basic (Project is ASAPSD) or Advanced search (project = ASAPSD). This advanced search is called JQL (Jira Query Language).
You can then use this JQL in your REST API search method:
https://docs.atlassian.com/software/jira/docs/api/REST/latest/#api/2/search-search
Example
GET https://jira.yourdomain.com/rest/api/2/search?jql=project%3DASAPSD
Notes
The output lists only limited number of issues (usually 50) - to get more issues, you need to increase the limit (maxResults param) or paginate (startAt param) over next results.
Using expand and fields params you can alter the output to get more/less information.
There two types of Jira instances - on-premise Server/Data Center and Cloud one. REST API and usage might slightly differ.
Alternatively, you can get CSV export. When you search for issues in the Issue Navigator, there's an option to export results to CSV. Save this URL and you can request it in your script via GET.

Has anyone come across issue[]?

issue[] in UiPath.
So I downloaded an extension / package from UiPath GO! named as "Jira Integrating Software". This Packages comes with several APIs to access Jira tickets.
I was working with one of these APIs called "Search by JQL". JQL is Jira Query Language comes in handy for Advance searching. The output type of this "Search by JQL" activity is issues[].
Now when I am Iterating this array it gives me an output of "UiPath.JiraSoftware.Models.Issue"
You should use a For Each activity iterating the ResultArray Array you got from the Search JQL.
The following is just pseudo code! But it should work like this. Maybe the name of the property is not IssueId. That was not completely told in the document. But this you can when you inspect it by using the debug mode:
You should also have a look on the official Jira UiPath page. This resource contains all of the concepts you will need.

YouTrack JavaScript Workflow - send email to global group

I am creating a state machine for YouTrack using JavaScript, and am trying to send an email to everyone in a group. In the old Workflows, this was done like this:
{group:PHP Developers}.notifyAllUsers("Subject","message");
I can't find anything in the new JavaScript API to do this, where can I find the global (not issue or project) groups?
In JS API it will look as follows:
entities.UserGroup.findByName('PHP Developers')
.notifyAllUsers('Subject','message');
However, another (and way more reliable) way to get a particular user group is to add it to requirements and the reference inside the code:
ctx.phpdevs.notifyAllUsers('Subject','message');
...
requirements: {
...
phpDevs: {
type: entities.UserGroup,
name: 'PHP Developers'
}
}
You may find more details in official documentation: UserGroup and Finding Specific Entities.

AtTask create/update a custom field through API on project creation created through AtTask's web app

I'm looking to use AtTask's API to update or create a custom field (ie. assign a custom ID apart from AtTask's auto-generated id) whenever a project is created through the web app. But I have not found anything about handling events in the API documentation.
I'm able to retrieve/edit project fields when issuing a request by ID or some other search parameter.
But I'm having trouble finding ways to edit project fields on some event like 'project created'.
One way I can think of is to have my script periodically search for new projects based on project metadata and edit projects that way, but there must be a better solution I probably missed.
Thanks in advance!
UPDATE:
It seems 'AtTask event subscriptions' was what I was looking for. At the time of the post below (12/2013), due to scalability issues, AtTask has turned this feature turned off with no ETA on resolving the issue. See here: Does AtTask event subscription work?
Any updates would be appreciated.
You are correct the AtTask API does not currently support events. The easiest thing to do is to just poll the system for updates using the search. You could also monitor an email address for emails that are sent upon project creation. The email will contain the project/task/issue ID that you can use to update events.

How does one list the changes via the API from a TeamCity build?

I'm trying to find a way to get all the comments from a particular build in TeamCity via the Rest API. How can one do that?
http://teamcity:port/httpAuth/app/rest/changes?locator=build:(id:77651)&fields=count,change:(version,username,date,href,comment,files)
Via this URL, one can list out in custom fashion exactly the fields they wish to return. I don't think this is documented, i got this from their support folks. Enjoy!
PS - There are other examples out there which iterate over each change, this lists out all the changes for a particular build id in one place, for parsing.