How to find an issue with name of the fixed_version_id instead of the id ? (redmine) - api

I would like to find an issue in Redmine with some criteria (ex: name of the fixed_version_id, project_id, ...) but I still not able to find the syntax.
The issue I would like to find has :
a custom field = 113
an application like BAC
a project_id = 997
a fixed_version_id's name = 221200
I tried this :
https://redmine.xxx.com/issues.xml?cf_113=BAC&project_id=997&status_id=*&fixed_version_id[name]=221200
But it does not work. Could you tell me if it's possible please ?
Thanks
H.
I try to find a way to get an issue based on the name of the fixed_version_id instead of its id

With the issue query, you have to provide a version ID. The issue filters can not filter based on other attribites of the version.
You can however use the API to get a list of versions in the project:
https://redmnine.xxx.com/projects/997/versions.xml
Using this list, you can find the ID of your desired version and use this ID in the second request to get the issues for the version.
The APIs are documented on the Redmine wiki at
https://www.redmine.org/projects/redmine/wiki/Rest_Issues
https://www.redmine.org/projects/redmine/wiki/Rest_Versions

Related

How to get Gerrit detail from change-id existing in different projects?

I would like to get change detail from change_id assume 123
Using GERRIT API:
https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#get-change-detail
But In such a case it throws error:
HTTP Error 404: Not Found
!! CODE=404 !! None -> b'Multiple changes found for 123\n' # http://<GERRIT_SERVER>/a/changes/123/detail
The problem is that there are changes with same change_id in multiple projects.
Same command works properly when I try to get detail for change_id which exists only in single project.
Do you know some workaround for such a case?
Add the project to the search.
See the Gerrit documentation here.
{change-id}
Identifier that uniquely identifies one change. It contains the URL-encoded project name as well as the change number: "'~'"
Gerrit also supports the following identifiers:
an ID of the change in the format "'~~'",
where for the branch the refs/heads/ prefix can be omitted
("myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940")
a Change-Id if it uniquely identifies one change
("I8473b95934b5732ac55d26311a706c9c2bde9940")
a numeric change ID ("4247")

How to filter with "_links" properties params on API.v3 in openproject

I just learned to use "hypermedia rest API" on openproject
I want to use "filter" param with "_links" properties on API but not know-how
Example:
http:/<my_domain>/target/api/v3/projects/design/work_packages?filters=[{"updatedAt":{"operator":"<>d","values":["2017-06-10T22:00:00Z","2017-07-05T22:00:00Z"]}, "_links":{"type":{"title":{"operator":"=","values":["Box"]}}}]
==> My Question:
i not known use to "_links":{"type":{"title":{"operator":"=","values":["Box"]} params filter. Now, result is not filter for "_links"
And show me books name to learn API for to beginner
? (https://www.oreilly.com/library/view/restful-web-clients/9781491921890/ch04.html#callout_hal_clients_CO1-1) -> is this ok?
Help me, please!
Thanks!
Image for my api
What I understood you wanting to achieve is getting all work packages in the project "design" that have been updated last within a certain time interval and that are of the type "Box".
The filters in OpenProject do not differentiate between native properties (like updatedAt) and linked resources (like type) when it comes to the structure of the filters. The syntax is always
{"<name of the filter>": {"operator": "<operator>": "values": [<list of values>]}}
When it comes to the filter values however, there is a difference. For linked resource the client is expected to use the id whereas native value like an integer, string or date is required for the native properties.
For your request the above requires the client to issue the following query:
GET http://domain/target/api/v3/projects/design/work_packages?filters=[{"updatedAt":{"operator":"<>d","values":["2017-06-10T22:00:00Z","2017-07-05T22:00:00Z"]}}, {"type":{"operator":"=", "values":["10"]}}]
I took the id of 10 for the type "Box" out of the screenshot you provided.
To get the filter values of all available filter you can call
POST http://domain/target/api/v3/queries/form
with a body of
{"name":"default","_links":{"project":{"href":"/api/v3/projects/design"}}}
The response will list all available filters in the _embedded/schema/_embedded/filtersSchema array.

JQl - how to find linked issues in an issue

Iam looking for the Jira JQL syntax, to find the linked-issues in an Issue. For example in Bug-issue i need to have in my report the linked-issues to my Bug-issue!
Thanks
If I understand your question well, you are looking for a JQL that will fetch you all the bugs that are LINKED to that specific bug!!! Considering this is what you're asking, here is the solution for that:
You'll need to create a filter as like what is shown below, and name this filter as MyFilter:
issuetype = Bug AND issuekey = ABC-12345
Then you will have to use this filter in the next filter to get all the linked issues (bugs) to the current bug:
issuetype in (Bug) and issueFunction in linkedIssuesOf('filter = MyFilter')
Using the second filter, you should be getting all the linked bugs to the original bug.
Hope this helps!

Magento API creates simple product correct -> but afterwards tells "101 Product not exists"

I try to add some pictures to a simple product, which was created (without error) by the API. The product is shown in frontend its functional with all wanted attributes. But if I check afterwards
$client->call($sessionId, 'product.info', '123456');
I get Soap Error: "101: Product doesn't exists". But its definitivly reachable over back- and frontend. (Cache cleared, Index refreshed)
Same issue, when I try to add media informations. On Confugurable Products the error don't show up and the pictures are added whithout any problems.
Maybe I messed something up with the attributes or the attribut sets... I don't know, where to watch first.
I'm at my php’s end!
Using Magento 1.6.0.0
Thank your for clarify me.
Best regards.
Since the ame API function ("product.info" in this case) receive as a parameter both SKU and ID, there is a problem if your are looking for SKU's which is numeric values.
To avoid this problem, we always adding space to the end of SKU before sending it to the API. For example, if your SKU is "123456" you should send "123456 " to the API.
Have you tried this call with your product id instead of the sku? I had some problems in the past with product calls and the sku.
I've installed 2 magentos and we always use numeric SKUs and I've always had this problem.
I've solved it by modifying the file:
app/code/core/Mage/Catalog/Model/Api/Resource.php
About line 122 that reads:
$product = Mage::helper('catalog/product')->getProduct($productId, $this->_getStoreId($store), $identifierType);
I've changed it to:
$product = Mage::helper('catalog/product')->getProduct($productId, $this->_getStoreId($store), 'sku');
This way the function always expects an SKU.

google analytics API, how to extract pageviews for a specific page?

Google Analytics API: how to extract pageviews for a specific page?
I tried using something like
ga:pagePath=~page.php%3fid%3d44 (page.php?id=44)
but it doesn't seem to work... I get "no results found" where I have 20 pageviews for sure
UPDATE
I think I found the solution
ga:pagePath==/website/page.php?id=44
for some reason I had to include the complete path and ==
To use a partial path to match for a page in filters you should use
ga:pagePath=#page.php?id=44
=# tells ga to match a substring.
What you were originally using was incorrect for this.
I think your problem is that you put the hex version of the ? and = characters into your query, which doesn't match how Analytics stores the page paths. If you change these to the normal characters it should work:
ga:pagePath=~page.php?id=44
Your other solution should work as well but is a bit more inflexible in case you wanted to tweak the query to return other pages.