State transition controlled by Effort value - tfs

I need to check if the value of the effort field is greater than 5. If this condition is true the item has to be approved, so in that case the next state has to be another than if the effort is less or equal 5.
Is there any opportunity to set this condition?

Can't be done
<TD;DR>
There is no such rule and since field Effort is a double typed field, it's not possible to use a list of allowedvalues (which would have worked for an integer field). Tools like the TFS Aggregator won't help either, as they can only act post-changed, there is no pre-validation support for Work Item changes on the server side.

Related

How to check that a TField has been modified manually

So I'm working on a form that makes use of database grids, I'm having an issue where I need to auto-default a field based upon the amount and GST fields. This will always auto-default my field for the user until the point where they manually change my field, at which point it obviously will not do anymore defaulting for that record.
Any ideas on how I can achieve the recognition of a manually modified field in Delphi? Please note I'm not talking about the manual modification of a record so the following code is not applicable to my situation (unless you can somehow find a way to use it).
Much appreciated!
Populate the value in the field when the amount or GST changes, and then calculate whatever the field is you want to auto-default. Allow the user to change it, and don't react to that change unless the user modifies the amount or GST again. You can use the TField.OnChange event (on the amount and GST fields) to do so.

CRM 2011 Workflow not updating field

I have a simple workflow that runs on Create. If field X is yes, change Allow Email to Allow.
I have also created a personal view with criteria Fields X = Yes and Allow Email = Do No Allow. This is to give me list of contact that missing out.
Looking at last 7 days records, everyday this workflow runs on around 600 new contacts and updates fields as expected. But I also noticed that small number of Contacts (about 30ish per day) do not get their Allow Email field updated to Allow even when they meet the criteria of the if condition.
At this point I checked at the WF history and very strangely it shows that the field should have been modified. (see screen shot)
Workflow did fire off
This contacts are not modified by any process or individual since the workflow had run
Workflow shows the usual green tick indicating that it did meet the criteria
Same workflow also updates 'Preferred language' and that seems to have updated fine for these contacts.
I have also double checked the Update property to make sure it set correctly.
Has anyone else seen this? This makes WF not 100% reliable for me!
Your workflow runs on Create.
If the record is created with Field X to No the workflow doesn't change the Allow value.
If a user change the Field X value to Yes after the record is created, you have the situation with records Field X Yes and Do Not Allow.
You wrote:
This contacts are not modified by any process or individual since the
workflow had run
to confirm this, did you check that the ModifiedOn date equals CreatedOn date? I suggest to turn on audit for Field X.
My guess is that you didn't set your workflow to run also when the Field X value change (and it should)

TFS Workitem Formula - default value from two fields

Some work items have estimate time, completed time and remaining time but out the box they do not have any defaults.
When editing the Work Item templates using Powertools you can set a default and you can also set a formula (although it seems to be a dropdown list).
How would you set the "remaining work" default value to be Estimated - Completed?
The field formula that is displayed in the field definition window is for other purposes. You can use it to set the forumula that is used by TFS Reporting Services.
It is not possible to set a calculation for remaining work in the workitemtype. You could accomplish this by writing a custom TFS event that is raised when you change the completed work.
I hope this answeres your question.
Regards,
Jeroen Niesen

How come "content_created_at" is later than "content_modified_at"

For some files the content_create_at field is set to a date that is later than the content_modified_at field. How can that be? Is this simply because these are the dates set by the client?
I have read http://developers.box.com/content-times/.
John is right. There is (likely) some client that is setting one or the other field. In general we recommend setting both the fields when you set them, so you don't provide confusing dates to other systems.

Generating values for dropdown ONLY for 'C' of CRUD

When choosing 'Add' in CRUD, how best to generate a list of choices to pick from a dropdown?
For U/update - just display what's there...
The field contents starts with a letter, followed by five numeric digits:{A-I,K-N,Z}#####
Each letter has a different 'max' value for the numeric part.
So when adding a new record, I'd like to offer a listbox with one of each letter and that letter's highest numeric value + 10.
So, if the max 'A' as A00120, and max 'B' B00030 (etc) the listbox would have A00130 and B00040.. etc
Save the user having to figure out which is 'next' when generating a new record.
? Thanks,
Mark
This time I'll not be able to come up with ready to use solution, but I must say - everything is possible with ATK4. You just have to customize and extend it to fit your needs :)
Speaking about your question above - I guess you have to split it in multiple parts.
First part is about how to show select box on Create and readonly or disabled field on Update. I guess you can make some custom Form field or pin some action to existing Form Field hook. Not sure exactly what's better in this case.
Second one is about data structure. I believe that this field actually should be 2 fields in DB and maybe (only maybe) merged together in ATK model with addExpression() just for user interface needs to display these 2 fields as one field easily in UI. Maybe such concatenated field will be useful also for searching, but definitely not as only one field stored in DB. Imagine how hard it'll be for DB engine to find max value if such field. Store it like type = letter, num = number and then search like SELECT max(num)+10 FROM t WHERE type='A'
Finally Third part is about how to generate this next number. I read your question 3 times and came to conclusion that actually you don't have to show this +10 numeric value in UI at all if it's hardly predefined anyway. Actually that'll not work correctly if this will be multi-user system which I guess it will. Instead just show simple select box with letters {A-I,K-N,Z} and calculate this next value exactly before inserting data in DB. That can be done using models insert hook. This will be much more appropriate solution and will be better for UI and also more stable because calculated in model not incorrectly in UI part.

Resources