create github like "label" feature - asp.net-mvc-2

I have noticed on github they allow you to create multiple labels and associate that with an issue, if you want to filter you can filter by label.
How would I go about creating something like this?
I have a task manager, what would I need to store in the database for the labels?
My process (thinkin out aloud): Create a task, allow user who created the task to add a label, this label has to be from a predifined list, so a table called UserLabels - where I can store the labels, I will show the labels from this list when a user wants to add multiple labels to their task.
Do I store the the label ids inside a nvarchar(max) field as an array i.e:
{labelid:5,labelid:6,labelid:900}
What is the best way to do this?

If you're wanting to do this the propper way you'd have a table that maps task ID's to Label ID's. as foreign keys.
This would be the correctly normalised way to do it.
Personally I'd have a field in my task table that contained either a list of label ids or the labels themselves. It would depend on my criteria really.

Related

How can I create a custom rule when changing board column in Azure Devops Boards?

I am trying to create a custom rule so that a custom field must be defined when moving a card to a specific board column but can't find how to do it.
Something in the lines of:
When board column changes value to "Deploy" make custom field "Target" required.
A user should not be able to move a card to column "Deploy" whithout field "Target" being defined.
Any suggestions?
There is a similar question but the only answer to that is using state changes isn't applicable for this particular column change.
The Board Column are not fields of work items as Shamrai mentioned. I am afraid it cannot be done by using the column Name.
The workaround is to map the columns to different states. And then add custom rule by using the workitem state changes.
Click the Gear icon on the Boards page, Navigate to Columns. See below:
You can add Custom State for User Story,Feature and Epic, if there are not enough states to map with the columns.
Go to Organization Settings--> Process under Boards-->Select the inherited process the your project using-->Click User Story(or Feature and Epic)-->Navigate to State and Add new State.
Now you can create the custom rule to make the Target field required when the state of the work item is changed (moved to a different column).
That`s a problem because Board Column, Board Lane, and Board Column Done fields are not available in the fields list to assign rules. I think you may try the following:
Add custom state "Deploy" and assign it to your column. Then use rules.
Create a custom application that queries Deploy without Target and returns such work items with comments "where is your target?" How can I find all work items in a given board column via Azure DevOps API? , How to update the work item from Powershell For VSTS?

How to bring custom fields created under inherited process in Azure DevOps Queries

I created a inherited process under inherited Scrum process (like 'X-Scrum') and added new fields like the below,
X.Original Estimate (Decimal)
X.Completed work (Decimal)
X.Remaining work (Decimal)
This is successfully done and reflected in the task screen.
Issue/ Help required:
I'm not able to bring those three fields into QUERIES, as I would like to extract all product backlog item, tasks and related custom fields.
Can someone help me on how to bring the custom fields into the queries.
Some special characters are prohibited for the Definition name of the custom field. If you add a new field with one of them(eg. .,()), you will get below error.
However you can change the Label of the field in the Layout section, which will be displayed in the task screen
In the QUERIES, only the Definition Name is showing up in the fields
So I guess you just changed the Layout Label of the custom field as X.Original Estimate (Decimal). But the Definition Name of the custom field is not X.Original Estimate (Decimal). Yon need to check what is Name for the field in Definition section. The Queries will reflect this Name.

Filemaker conditional dropdown population

continuing a project I have posted a few questions for already are you able to have a more precise definition of what a dropdown is populated with?
I am using FM Starting Point and have a Projects, Estimate and Task table. A project can hold multiple estimates and tasks. Estimates contain multiple lines (stored in a separate table).
When In a Project you can add a task for that project. What I want to do is replace the field that gives the task a name with a list of lines contained within the estimates related to the project i have selected to add the task from.
I have created a dropdown and using the inspector got it to display all estimate lines but somehow I need to write a function that will only select lines from estimates that are within the project and also only estimates that have a field set to "active" for example.
what I am struggling with is where I can programme such a thing? In the inspector, you are limited to displaying a value and cant programme in a statement. I have tried a script that executes OnObjectEnter or OnObjectModify but that doesn't appear to work.
Any ideas where I can enter a more complex set of rules as to what populates a dropdown?
Create a relationship with the criteria you need. Base the value list for the dropdown on this relationship.
As for display, The value list's second field can be from a calculated field with any data or several other fields stringed together if no single field is sufficient. The first field should be the ID.

How to create table occurrences for filtered data..?

I have a table called transactions. Within that is a field called ipn_type. I would like to create separate table occurrences for the different ipn types I may have.
For example, one value for ipn_type is "dispute". In the past I would create a global field called "rel_dispute" and I would populate that with the value of "dispute". Then I could create a new table occurrence of the transactions table, and make a relationship based on transactions::ipn_type = transactions::rel_dispute. This way only the dispute records would show up in my new table occurrence.
Not long ago, somebody pointed out to me that this is no longer necessary, and there is a simpler way to setup such a relationship to create a new table occurrence. I can't for the life of me remember how that was done, though.
Any information on this would be greatly appreciated. Thanks!
To show a found set of only one type, you must either perform a find or use the Go to Related Record script step to show only related records. What you describe as your previous setup fits the latter.
The simpler way is to perform a find - either on demand, or by a script triggered OnLayoutEnter.
The new 'easy' way is probably:
using one base relationship only and
filtering only the displaying portal by type. This can be done with a global field, a global variable containing current display type. Multiple portals with different filter conditions are possible as well.
~jens

Create a new FileMaker layout showing unique records based on one field and a count for each

I have a table like this:
Application,Program,UsedObject
It can have data like this:
A,P1,ZZ
A,P1,BB
A,P2,CC
B,F1,KK
I'd like to create a layout to show:
Application,# of Programs
A,2
B,1
The point is to count the distinct programs.
For the life of me I can't make this work in FileMaker. I've created a summary field to count programs resetting after each group, but because it doesn't eliminate the duplicate programs I get:
A,3
B,1
Any help much appreciated.
Create a a summary field as:
cntApplicaiton = Count of Application
Do this by going into define fields, create a field called cntApplication, type summary. In the options dialogue make the summary field a count on application
Now create a new layout with a subsummary part and nobody. The subsummary should be sorted on Application. Put the Application and cntApplication fields in subsummary. If you enter browse mode and sort by Application you ought to get the data you want.
You can also create a calc field with the formula
GetSummary(cntApplication; Application)
This will allow you to use the total number of Applications with in a record
Since I also generate the data in this form, the solution I've adopted is to fill two tables in FileMaker. One provides the summary view, the other the detailed view.
I think that your problem is down to dupliate records and an inadequate key.
Create a text field called "App_Prog". In the options box set it to an auto-enter calc, unchecking the 'Do not replace...' option, and use the following calc:
Application & "_" & Program
Now create a self join to the table using App_Prog as the field on both sides, and call this 'MatchingApps'.
Now, create (if you don't alread have one) a unique serial number field, 'Counter' say, and make sure that you enter a value in each record. (Find all, click in the field, and use serial number option in'Replace Field Contents...')
Now add a new calc field - Is_Duplicate with the following calc...
If (Counter = MatchingApps::Counter; "Master Record" ; "Duplicate")
Finally, find all, click in the 'Application field, and use 'Replace Field Contents...' with a calculation to force the auto-enter calc for 'App_Prog' to come up with a value.
Where does this get you? You should now have a set of records that are marker either "Master Record" or "Duplicate". Do a find on "Master Record", and then you can perform your summary (by Application) to do a count of distinct application-program pairs.
If you have access to custom functions (you need FileMaker Pro Advanced), I'd do it like this:
Add the RemoveDuplicates function as found here (this is a recursive function that takes a list of strings and returns a list of unique values).
In the relationships graph, add another occurrence of your table and add an Application = Application relationship.
Create a calculated field in the table with the calculation looking something like this:
ValueCount(RemoveDuplicates(List(TABLE2::Program)))
You'll find that each record will contain the number of distinct programs for the given application. Showing a summary for each application should be relatively trivial from here.
I think the best way to do this is to create a separate applications table. So as you've given the data, it would have two records, one for A and one for B.
So, with the addition of an Applications table and your existing table, which I'll call Objects, create a relationship from Applications to Objects (with a table occurrence called ObjectsParent) based on the ApplicationName as the match field. Create a self join relationship between Objects and itself with both Application and Program as the match fields. I'll call one of the "table occurrences" ObjectsParent and the other ObjectsChildren. Make sure that there's a primary key field in Objects that is set to auto-enter a serial number or some other method to ensure uniqueness. I'll call this ID.
So your relationship graph has three table occurrences:
Applications::Applicaiton = ObjectsParent::Application
ObjectsParent::Application = ObjectsChildren::Application, ObjectsParent::Program = ObjectsChildren::Program
Now create a calculation field in Objects, and calculating from the context of ObjectsParent, give it the following formula:
AppCount = Count( ObjectsChildren::ID )
Create a calculation field in Applications and calculating from the context of the table occurrence you used to relate it to ObjectsParent with the following formula:
AppCount = ObjectsParent::AppCount
The count field in Objects will have the same value for every object with the same application, so it doesn't matter which one you get this data from.
If you now view the data in Applications in list view, you can place the Applications::Application and Applications::AppCount fields on the layout and you should get what you've requested.