How to mapping identity fields? - azure-devops

How to setup FieldValueMap for identityRef fields, AssignedTo for example? I migrate from DevOps Services to DevOps Server 2020 Update 1.1
// no work
{
"$type": "FieldValueMapConfig",
"WorkItemTypeName": "*",
"sourceField": "System.AssignedTo.id",
"targetField": "System.AssignedTo.id",
"valueMapping": {
}
}
// migration.exe crash
{
"$type": "FieldValueMapConfig",
"WorkItemTypeName": "*",
"sourceField": "System.AssignedTo",
"targetField": "System.AssignedTo",
"valueMapping": {
{
"displayName": "displayName",
"url": "url",
"_links": {
"avatar": {
"href": "href"
}
},
"id": "id",
"uniqueName": "uniqueName",
"imageUrl": "imageUrl",
"descriptor": "descriptor"
}: {
"displayName": "mapped_displayName",
"url": "mapped_url",
"_links": {
"avatar": {
"href": "mapped_href"
}
},
"id": "mapped_id",
"uniqueName": "mapped_uniqueName",
"imageUrl": "mapped_imageUrl",
"descriptor": "mapped_descriptor"
}
}
}
Can anybody help?
Same issue on github.

Related

PayPal subscription approval link throws an error

I am using Postman for this. It generates the following link https://www.sandbox.paypal.com/webapps/billing/subscriptions?ba_token=BA-79D58732NX9686808 however when I visit it, I see the following error message:
Things don't appear to be working at the moment. Please try again later.
After getting a token, I created a product then I created a plan and finally, I created a subscription. Am I missing something?
Here is what I have done and the response I have received:
Create Product:
{
"id": "FF-SUBSCRIPTION-SERVICE-BASIC-T1",
"name": "Subscription Basic Plan",
"description": "Basic Service Subscription Plan",
"type": "SERVICE"
}
Create Plan:
{
"product_id": "FF-SUBSCRIPTION-SERVICE-BASIC-T1",
"name": "Subscription Basic Plan",
"description": "Basic Service Subscription Plan",
"status": "ACTIVE",
"payment_preferences": {
"auto_bill_outstanding": true,
"payment_failure_threshold": 5
},
"billing_cycles": [
{
"frequency": {
"interval_unit": "MONTH",
"interval_count": 1
},
"tenure_type": "TRIAL",
"sequence": 1,
"total_cycles": 1
},
{
"frequency": {
"interval_unit": "MONTH",
"interval_count": 1
},
"tenure_type": "REGULAR",
"sequence": 2,
"total_cycles": 0,
"pricing_scheme": {
"fixed_price": {
"value": "14.99",
"currency_code": "USD"
}
}
}
]
}
Create Subscription:
{
"plan_id": "P-1DM03386YX156733CMNORKJQ",
"quantity": "1",
"shipping_amount": {
"currency_code": "USD",
"value": "14.99"
},
"subscriber": {
"name": {
"given_name": "John",
"surname": "Doe"
},
"email_address": "sb-xahhi21980157#personal.example.com"
}
},
"application_context": {
"brand_name": "X",
"locale": "en-US",
"shipping_preference": "SET_PROVIDED_ADDRESS",
"user_action": "SUBSCRIBE_NOW",
"payment_method": {
"payer_selected": "PAYPAL",
"payee_preferred": "IMMEDIATE_PAYMENT_REQUIRED"
},
"return_url": "https://www.example.com/returnUrl",
"cancel_url": "https://www.example.com/cancelUrl"
}
}
The response I receive is as follows:
{
"status": "APPROVAL_PENDING",
"id": "I-N6DFDLTU8HK9",
"create_time": "2022-10-29T11:58:28Z",
"links": [
{
"href": "https://www.sandbox.paypal.com/webapps/billing/subscriptions?ba_token=BA-79D58732NX9686808",
"rel": "approve",
"method": "GET"
},
{
"href": "https://api-m.sandbox.paypal.com/v1/billing/subscriptions/I-N6DFDLTU8HK9",
"rel": "edit",
"method": "PATCH"
},
{
"href": "https://api-m.sandbox.paypal.com/v1/billing/subscriptions/I-N6DFDLTU8HK9",
"rel": "self",
"method": "GET"
}
]
}

Transaction API doesn't work with the payment

Since two weeks we are trying to implement transaction api v3. with Google
payment option. Once we did a transaction the receipt has been displayed.
When we pressed "order" button we got confirmation that the transaction is
being confirmed but in developer Dotpay panel there were no visible
payments.
After a few transactions action stopped displaying the receipt and it
informed that "something went wrong. Try again later". When we removed googlePaymentOption from
TransactionDecision the receipt has been displayed but we were still not
able to make any transactions.
It lasted for a few days and after that we were able to make transactions again but there were
still no payments visible.
Can you please have a look?
Hereby you can find our transaction logs:
{
"conversationToken": "[\"_actions_on_google\",\"podsumowanie\",\"rezerwuj_dostawe\",\"zmien_zamowienie_lista\",\"start_index\",\"modyfikuj_koszyk\",\"dodaj_produkt\"]",
"expectUserResponse": true,
"expectedInputs": [{
"inputPrompt": {
"richInitialPrompt": {
"items": [{
"simpleResponse": {
"textToSpeech": "Transaction Decision Placeholder."
}
}]
}
},
"possibleIntents": [{
"intent": "actions.intent.TRANSACTION_DECISION",
"inputValueData": {
"#type": "type.googleapis.com/google.actions.transactions.v3.TransactionDecisionValueSpec",
"order": {
"merchantOrderId": "9g1blj8rmvo",
"userVisibleOrderId": "9g1blj8rmvo",
"buyerInfo": {
"email": "janedoe#gmail.com",
"firstName": "Jane",
"lastName": "Doe",
"displayName": "Jane Doe"
},
"createTime": "2020-06-09T14:02:08.812Z",
"lastUpdateTime": "2020-06-09T14:02:08.812Z",
"transactionMerchant": {
"id": "book_store_1",
"name": "Book Store"
},
"contents": {
"lineItems": [{
"id": "memoirs_4",
"name": "Our memoirs",
"priceAttributes": [{
"type": "REGULAR",
"name": "Item Price",
"state": "ACTUAL",
"amount": {
"currencyCode": "PLN",
"amountInMicros": "1000000"
},
"taxIncluded": true
}, {
"type": "TOTAL",
"name": "Total Price",
"state": "ACTUAL",
"amount": {
"currencyCode": "PLN",
"amountInMicros": "1000000"
},
"taxIncluded": true
}],
"notes": ["Special introduction by author."],
"purchase": {
"quantity": 1
}
}]
},
"priceAttributes": [{
"type": "SUBTOTAL",
"name": "Subtotal",
"state": "ESTIMATE",
"amount": {
"currencyCode": "PLN",
"amountInMicros": "1000000"
},
"taxIncluded": true
}, {
"type": "DELIVERY",
"name": "Delivery",
"state": "ACTUAL",
"amount": {
"currencyCode": "PLN"
},
"taxIncluded": true
}, {
"type": "TAX",
"name": "Tax",
"state": "ESTIMATE",
"amount": {
"currencyCode": "PLN"
},
"taxIncluded": true
}, {
"type": "TOTAL",
"name": "Total Price",
"state": "ESTIMATE",
"amount": {
"currencyCode": "PLN",
"amountInMicros": "1000000"
},
"taxIncluded": true
}],
"followUpActions": [{
"type": "VIEW_DETAILS",
"title": "View details",
"openUrlAction": {
"url": "http://example.com"
}
}, {
"type": "CALL",
"title": "Call us",
"openUrlAction": {
"url": "tel:+16501112222"
}
}, {
"type": "EMAIL",
"title": "Email us",
"openUrlAction": {
"url": "mailto:person#example.com"
}
}],
"termsOfServiceUrl": "http://www.example.com",
"note": "The Memoir collection",
"purchase": {
"status": "CREATED",
"type": "RETAIL",
"returnsInfo": {
"daysToReturn": 1,
"policyUrl": "http://www.example.com"
},
"fulfillmentInfo": {
"id": "FULFILLMENT_SERVICE_ID",
"fulfillmentType": "DELIVERY",
"expectedFulfillmentTime": {
"timeIso8601": "2025-09-25T18:00:00.877Z"
},
"price": {
"type": "REGULAR",
"name": "Delivery Price",
"state": "ACTUAL",
"amount": {
"currencyCode": "PLN"
},
"taxIncluded": true
},
"fulfillmentContact": {
"email": "janedoe#gmail.com",
"firstName": "Jane",
"lastName": "Doe",
"displayName": "Jane Doe"
}
},
"purchaseLocationType": "ONLINE_PURCHASE",
"userVisibleStatusLabel": "CREATED"
}
},
"orderOptions": {
"userInfoOptions": {
"userInfoProperties": ["EMAIL"]
}
},
"paymentParameters": {
"googlePaymentOption": {
"facilitationSpec": "{\"apiVersion\":2,\"apiVersionMinor\":0,\"merchantInfo\":{\"merchantName\":\"Frisco\"},\"allowedPaymentMethods\":[{\"type\":\"CARD\",\"parameters\":{\"allowedAuthMethods\":[\"PAN_ONLY\"],\"allowedCardNetworks\":[\"MASTERCARD\",\"VISA\"]},\"tokenizationSpecification\":{\"type\":\"PAYMENT_GATEWAY\",\"parameters\":{\"gateway\":\"dotpay\",\"gatewayMerchantId\":\"705777\"}}}],\"transactionInfo\":{\"totalPriceStatus\":\"FINAL\",\"totalPrice\":\"1.00\",\"currencyCode\":\"PLN\"}}"
}
},
"presentationOptions": {
"actionDisplayName": "PLACE_ORDER"
}
}
}],
"speechBiasingHints": ["$usun", "$dalej", "$events", "$wroc", "$product", "$deleteProduct", "$sztuka", "$dodaj", "$ilosc", "$produkty", "$deleteOrder"]
}],
"responseMetadata": {
"status": {
"message": "Success (200)"
},
"queryMatchInfo": {
"queryMatched": true,
"intent": "777d19a8-c59a-46d2-ae22-212827b5726e"
}
}
} ```
Currently, Google is working with a limited number of partners that can get access to the production Google Pay API. If you're not one of those partners, you're welcome to read the documentation and test the integration using the sandbox environment.
https://developers.google.com/assistant/transactions/physical/dev-guide-physical-gpay
If you are indeed one of these partners, please reach out to your Google contact.

Attaching latest content of blob storage to SendGrid

How to attach latest blob content in sendgrid service using logic app?
You can create a Blob trigger LA with SendGrid Action as shown below:
{
"$connections": {
"value": {
"azureblob": {
"connectionId": "/subscriptions/<SubscriptionId>/resourceGroups/<ResourceGroup>/providers/Microsoft.Web/connections/azureblob",
"connectionName": "azureblob",
"id": "/subscriptions/<SubscriptionId>/providers/Microsoft.Web/locations/southeastasia/managedApis/azureblob"
},
"sendgrid": {
"connectionId": "/subscriptions/<SubscriptionId>/resourceGroups/<ResourceGroup>/providers/Microsoft.Web/connections/sendgrid",
"connectionName": "sendgrid",
"id": "/subscriptions/<SubscriptionId>/providers/Microsoft.Web/locations/southeastasia/managedApis/sendgrid"
}
}
},
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"Get_blob_content_using_path": {
"inputs": {
"host": {
"connection": {
"name": "#parameters('$connections')['azureblob']['connectionId']"
}
},
"method": "get",
"path": "/datasets/default/GetFileContentByPath",
"queries": {
"inferContentType": true,
"path": "#triggerBody()?['Path']",
"queryParametersSingleEncoded": true
}
},
"runAfter": {},
"type": "ApiConnection"
},
"Send_email_(V2)": {
"inputs": {
"body": {
"file": "#{base64(body('Get_blob_content_using_path'))}",
"filename": "#triggerBody()?['Name']",
"from": "<FromEmail>",
"ishtml": true,
"subject": "test attach met",
"text": "PFA",
"to": "<ToEmail>"
},
"host": {
"connection": {
"name": "#parameters('$connections')['sendgrid']['connectionId']"
}
},
"method": "post",
"path": "/mail/send"
},
"runAfter": {
"Get_blob_content_using_path": [
"Succeeded"
]
},
"type": "ApiConnection"
}
},
"contentVersion": "1.0.0.0",
"outputs": {},
"parameters": {
"$connections": {
"defaultValue": {},
"type": "Object"
}
},
"triggers": {
"When_a_blob_is_added_or_modified_(properties_only)": {
"inputs": {
"host": {
"connection": {
"name": "#parameters('$connections')['azureblob']['connectionId']"
}
},
"method": "get",
"path": "/datasets/default/triggers/batch/onupdatedfile",
"queries": {
"folderId": "JTJmbGFjb250YWluZXI=",
"maxFileCount": 10
}
},
"metadata": {
"JTJmbGFjb250YWluZXI=": "/lacontainer"
},
"recurrence": {
"frequency": "Minute",
"interval": 3
},
"splitOn": "#triggerBody()",
"type": "ApiConnection"
}
}
}
}

Working with zoho api's

I am working on ZOHO API's. Using POSTMAN I am trying to GET the details of a project. The API is as follows
GET /portal/[PORTALID]/projects/[PROJECTID]/
Sample Response
Status: 200 Success
Content Type: application/json;charset=utf-8
{
"projects": [{
"id": 170876000000765009,
"task_count": {
"open": 6,
"closed": 7
},
"milestone_count": {
"open": 2,
"closed": 1
},
"bug_count": {
"open": 2,
"closed": 1
},
"name": "Website Design Templates",
"status": "active",
"created_date": "10-22-2012 02:45 PM",
"created_date_long": 1350926134092,
"description": "This project is to discuss different design templates to build a website",
"owner_name": "Patricia Boyle",
"owner_id": "2060758",
"link": {
"self": {
"url": "https://projectsapi.zoho.com/restapi/portal/
2063927/projects/170876000000765009/"
},
"activity": {
"url": "https://projectsapi.zoho.com/restapi/portal/
2063927/projects/170876000000765009/activities/"
},
"status": {
"url": "https://projectsapi.zoho.com/restapi/portal/
2063927/projects/170876000000765009/statuses/"
},
"milestone": {
"url": "https://projectsapi.zoho.com/restapi/portal/
2063927/projects/170876000000765009/milestones/"
},
"tasklist": {
"url": "https://projectsapi.zoho.com/restapi/portal/
2063927/projects/170876000000765009/tasklists/"
},
"task": {
"url": "https://projectsapi.zoho.com/restapi/portal/
2063927/projects/170876000000765009/tasks/"
},
"bug": {
"url": "https://projectsapi.zoho.com/restapi/portal/
2063927/projects/170876000000765009/bugs/"
},
"timesheet": {
"url": "https://projectsapi.zoho.com/restapi/portal/
2063927/projects/170876000000765009/logs/"
},
"event": {
"url": "https://projectsapi.zoho.com/restapi/portal/
2063927/projects/170876000000765009/events/"
},
"document": {
"url": "https://projectsapi.zoho.com/restapi/portal/
2063927/projects/170876000000765009/documents/"
},
"folder": {
"url": "https://projectsapi.zoho.com/restapi/portal/
2063927/projects/170876000000765009/folders/"
},
"forum": {
"url": "https://projectsapi.zoho.com/restapi/portal/
2063927/projects/170876000000765009/forums/"
},
"user": {
"url": "https://projectsapi.zoho.com/restapi/portal/
2063927/projects/170876000000765009/users/"
}
}
}]
}
The link is here
But when I try to GET the details. It gives me 404 error. Below is my request.
https://bugtracker.zoho.com/portal/fasi/projects/7958751212/
Authentication Token: c1d5c4cfd0bfcfd8b10caf0b174hhh
Moreover, in the link, there is nothing given that how to send the request. All there is sample response.
How can I send a correct request to get the details?
Any help would be highly appreciated.

what is the date format from stash api?

In the below json response, what is the date format for createdDate and updatedDate? I am not sure how to work in reverse to find what format the api is using for date. I couldn't find this any where in the documentation.
{
"size": 1,
"limit": 25,
"isLastPage": true,
"values": [
{
"id": 101,
"version": 1,
"title": "Talking Nerdy",
"description": "It’s a kludge, but put the tuple from the database in the cache.",
"state": "OPEN",
"open": true,
"closed": false,
"createdDate": 1359075920,
"updatedDate": 1359085920,
"fromRef": {
"id": "refs/heads/feature-ABC-123",
"repository": {
"slug": "my-repo",
"name": null,
"project": {
"key": "PRJ"
}
}
},
"toRef": {
"id": "refs/heads/master",
"repository": {
"slug": "my-repo",
"name": null,
"project": {
"key": "PRJ"
}
}
},
"locked": false,
"author": {
"user": {
"name": "tom",
"emailAddress": "tom#example.com",
"id": 115026,
"displayName": "Tom",
"active": true,
"slug": "tom",
"type": "NORMAL"
},
"role": "AUTHOR",
"approved": true
},
"reviewers": [
{
"user": {
"name": "jcitizen",
"emailAddress": "jane#example.com",
"id": 101,
"displayName": "Jane Citizen",
"active": true,
"slug": "jcitizen",
"type": "NORMAL"
},
"role": "REVIEWER",
"approved": true
}
],
"participants": [
{
"user": {
"name": "dick",
"emailAddress": "dick#example.com",
"id": 3083181,
"displayName": "Dick",
"active": true,
"slug": "dick",
"type": "NORMAL"
},
"role": "PARTICIPANT",
"approved": false
},
{
"user": {
"name": "harry",
"emailAddress": "harry#example.com",
"id": 99049120,
"displayName": "Harry",
"active": true,
"slug": "harry",
"type": "NORMAL"
},
"role": "PARTICIPANT",
"approved": true
}
],
"link": {
"url": "http://link/to/pullrequest",
"rel": "self"
},
"links": {
"self": [
{
"href": "http://link/to/pullrequest"
}
]
}
}
],
"start": 0
}
Just making a note that in my case, it is a UNIX timestamp, but I have to remove three trailing zeroes. E.g. the data looks like this:
"createdDate":1555621993000
If interpreted as a UNIX timestamp, that would be 09/12/51265 # 4:16am (UTC).
By removing the three trailing zeroes I get 1555621993, which is the correct time 04/18/2019 # 9:13pm (UTC)
Your mileage may vary but that was a key discovery for me :)
It looks like a UNIX timestamp.
https://en.wikipedia.org/wiki/Unix_time