VS2013/TFS2013 Query Reviewers - visual-studio-2013

I have been searching MSDN/Google/Stackoverflow and not able to find a way to create a query where it shows all the code reviews requesting your input. This is before you accept the code review and before you might have any knowledge of it. I know we can obtain open code review work items with a query like the following:
And/Or Field Operator Value
Team Project = #Project
And Work Item Type = Code Review Request
And State <> Closed
You can also personalize reviews you have accepted with the following:
And/Or Field Operator Value
Team Project = #Project
And Work Item Type = Code Review Request
And State <> Closed
And Accepted By Contains #Me
These solution are not exactly what I am looking for, as I am trying to find a query that uses the #Me Value to find all reviews before you accept. This is to help anyone see all their pending reviews requests if in case they miss or deleted the email alert for the code review request. Any ideas, suggestion, and solutions are greatly appreciated.
Thank you for your help in advance!

Use Assigned To
AndOr Field Operator Value
Work Item Type In Group Microsoft.CodeReviewResponseCategory
And Assigned To <> #Me
And Accepted By =

Related

Power Automate get data from Project Online and Filter

I am using "Send an HTTP Request to Sharepoint" action, and I want to filter the output to only include the project with ID = [user input filed in "Manually trigger a flow"]
My Uri seems to not be working and can't find errors; I have used this action before with no problems, can't figure what syntax (?) problem I may have?
Here is the Uri:
_api/ProjectData/Projects()?$Filter=ProjectUID eq '#{variables('proj id')}'&?Select=ProjectName,ProjectWorkspaceInternalUrl,ProjectUID,ProjectIdentifier
Can anyone spot the problem?!
Thanks so much in advance :)
For the URI try the following instead:
/_api/ProjectData/Projects()?$filter=ProjectId eq guid'xxxxx' &$Select=ProjectName,ProjectWorkspaceInternalUrl,ProjectId,ProjectIdentifier
where xxxx is your project id or in this case #{variables('proj id')}
It makes it easier to deal with the data as it doesn't return an array.

VSTS work item query to include both not assigned work items and the ones assigned to me

I need to locate all work items in my VSTS project, that either are not assigned to anyone - or is assigned to myself - how do I make a query like that?
State should be not Resolved, not removed, not completed, not closed, but I can handle those :)
It's simple, make a query with:
Assigned To = #Me
Or
Assigned To =

Parse.com : PFRelation With accept or denied

Hello everyone I would like to know if it 'possible to create pfrelation inserting a chance' to accept or reject the report. P.S. I am following message destructive app thanks
Ps I'm using parse.com
This is an instance where you would need to create a join table/class manually, e.g.:
[SubmittedProjects]
SubmittedBy: relation->User
SubmittedTo: relation->User
Project: relation->Project
Status: string ("pending", "approved", "rejected")
You could then easily find all records given a number of parameters, e.g.
All projects waiting for my approval:
SubmittedTo = me
Status = "pending"
People I need to nag to approve/reject my projects:
SubmittedFrom = me
Status = "pending"
List of all approved projects:
Status = "approved"
Hmm, thinking about it now, these could just be extra fields on your Project table if you only have need of one record for each project.
Your question has very little information so please expand it if this isn't what you meant.

Find the name and email address of non-members who used coupon code in Magento

We would like to be able to pull the name and email address of customers who purchased items as a guest. Has anyone had any luck in doing so?
I've seen a few posts of how to pull the names of customers who have used the coupon code, but nothing about non-customers!
Thank you guys very much for your help!
-Jeff
This should work:
$orderCollection = Mage::getModel('sales/order')->getCollection()
->addAttributeToSelect('customer_firstname')
->addAttributeToSelect('customer_lastname')
->addAttributeToSelect('customer_email')
->addAttributeToSelect('customer_group_id')
->addAttributeToFilter('customer_group_id', Mage_Customer_Model_Group::NOT_LOGGED_IN_ID)
;
You can then access the values by iterating over the collection...
foreach($orderCollection as $order) {
$customerFirstname = $order->getData('customer_firstname');
$customerLastname = $order->getData('customer_lastname');
$customerEmail = $order->getData('customer_email');
//Do what you want with the values here
}
EDIT:
The above code answers the first paragraph of your question. The second paragraph suggests you are looking for something different though. Are you looking for guest customers who have used a particular coupon code? If so then you should load the collection like this:
$orderCollection = Mage::getModel('sales/order')->getCollection()
->addAttributeToSelect('customer_firstname')
->addAttributeToSelect('customer_lastname')
->addAttributeToSelect('customer_email')
->addAttributeToSelect('customer_group_id')
->addAttributeToSelect('coupon_code')
->addAttributeToFilter('customer_group_id', Mage_Customer_Model_Group::NOT_LOGGED_IN_ID)
->addAttributeToFilter('coupon_code', 'your_awesome_coupon_code')
;
Drew gave me a SQL statement for names and emails of the existing customers in another similar post. To get all orders including registered users and guests you can use this SQL:
SELECT `customer_firstname`, `customer_lastname`, `customer_email` FROM `sales_flat_order` WHERE `coupon_code` = 'your_awesome_coupon_code'
Worked like a charm! Double-checked in 'salesrule_coupon' and the rows returned in the sql matches the number of times the coupon was used.
I will leave Drew's answer marked as correct, since it is probably better to do it in magento. Anyone looking for the SQL though, use this one!
The SQL statement for registered users only can be found here: How can I see full order details for each time a certain coupon code was used in magento?

Read Only Error on incident form in plugin CRM 2011 Plugin

I have a problem, which I'm really trying to figure out how I could best solve this. I have read various posts regarding this error and seems you can avoid this by using JavaScript by using:
Xrm.Page.getAttribute("name").setSubmitMode("always");
which doesn't work for me or inside the plugin. Now to my problem, I have an update plugin firing on my incident form, which updates some fields. However when I try to resolve the case or cancel it I get the error from my update plugin "The object cannot be updated because it is read-only" I have tried the following and would appreciate if somone could advice me what I'm doing wrong. My code for a plugin I'm registering as SetState on pre-operation against the incident form:
SetStateRequest setState = new SetStateRequest();
setState.EntityMoniker = new EntityReference();
setState.EntityMoniker.Id = incidentId; //Id which needs to be resolved/canceld
setState.EntityMoniker.Name = "statecode";
setState.EntityMoniker.LogicalName = "incident";
setState.State = new OptionSetValue();
setState.Status = new OptionSetValue();
SetStateResponse setStateResponse = (SetStateResponse)service.Execute(setState); }
On the state and status I'm quite confused to what value I have to set it to. I'm just getting an error when my incident is on Active and I'm trying to resolve and cancel the case. I would appreciate if someone could help me out here. Thanks in advance.
I think there are a few areas of confusion in your post...
Xrm.Page.getAttribute("name").setSubmitMode("always");
This is clientside code and will never have any bearing on the behaviour of your (serverside) plugin. It merely forces an attribute on the form to be submitted whether it has changed or not, during a save. If the record is in a read-only state, it will not change that fact.
I'm not at all clear what you are trying to acheive in your code. You mention that an update plugin is failing; you have posted code which would attempt to set the state of the incident to something (as #glosrob suggests, you are not providing any values in the OptionSetValue objects for State and Status so as you might already know, the code you have posted is invalid); you then state that you have registered your plugin on the SetState request. This means that it would fire if the user tries to set the state of the incident. Given that your code is itself trying to set the status of the incident, I'm not sure that it makes sense...
It sounds like what you want to do is, on update of an incident, set certain values. If the incident is in a read-only state, make it readable first, and then update the values. Do you then need to restore the state of the entity to it's former state? It sounds awkward and might perhaps suggest that there is a better way to meet your core requirement.
Maybe start with what you are trying to achieve and we can work from there :)
You should remove
setState.EntityMoniker.Name = "statecode";
from your code. This field Name has other purpose.
Also, you should add
setState.State.Value = 1;
setState.Status.Value = -1;

Resources