Closed MarkusLaakso closed 6 years ago
Are you getting this error when running witadmin.exe? Can you share xml giving the issue?
We're experiencing the same issue on TFS 2017 U3.
<FIELD name="Client" refname="Suite.Client" type="String">
<SUGGESTEDVALUES expanditems="true">
<GLOBALLIST name="Suite Clients" />
</SUGGESTEDVALUES>
</FIELD>
<Extensions>
<Extension Id="ms-devlabs.vsts-extensions-multivalue-control" />
</Extensions>
<Page Label="Description" LayoutMode="FirstColumnWide">
<Section>
<Group Label="Description">
<Control Label="Description" Type="HtmlFieldControl" FieldName="System.Description" />
</Group>
</Section>
<Section>
<Group Label="Client:">
<ControlContribution Label="Client:" Id="ms-devlabs.vsts-extensions-multivalue-control.multivalue-form-control">
<Inputs>
<Input Id="FieldName" Value="Suite.Client" />
</Inputs>
</ControlContribution>
</Group>
</Section>
</Page>
@mmanela Yes, we get the issue when running "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\witadmin.exe importwitd ..."
Global lists have following kind of content (nothing special)
<GLOBALLIST name="VMS.glXyz">
<LISTITEM value="Item 1" />
<LISTITEM value="Item 2" />
<LISTITEM value="Item 3" />
</GLOBALLIST>
The WITD like the one above, but we are using PlainText field for the multivalue control (again, nothing special...)
<FIELD name="Xyz" refname="VMS.Xyz" type="PlainText">
<SUGGESTEDVALUES expanditems="true">
<GLOBALLIST name="VMS.glXyz" />
</SUGGESTEDVALUES>
</FIELD>
<Extensions>
<Extension Id="ms-devlabs.vsts-extensions-multivalue-control" />
</Extensions>
<Section>
<Group Label="Classification">
<ControlContribution Label="Xyz" Id="ms-devlabs.vsts-extensions-multivalue-control.multivalue-form-control">
<Inputs>
<Input Id="FieldName" Value="VMS.Xyz" />
</Inputs>
</ControlContribution>
</Group>
</Section>
When do you fix this issue?
Thanks, Markus
This is currently not supported. You are not able to set SuggestedValues rule on PlainText or HTML field types. However, the control supports you specifying values when configuring it. For example:
<ControlContribution Label="Label" Id="ms-devlabs.vsts-extensions-multivalue-control.multivalue-form-control">
<Inputs>
<Input Id="FieldName" Value="RefNameOfTheField" />
<Input Id="Values" Value="One;Two;Three;Four" />
</Inputs>
</ControlContribution>
This will configure the control to have the four values (One, Two, Three, Four).
@mmanela Currently not supported where? This was working recently and now it's not. Hardcoding the values in the WIT definition is exactly what we don't want to do. What happens when there's a new value and there are multiple WITs in multiple projects which pull from that global list?
@jdshkolnik From what I see, adding SuggestedValues with a GlobalList inside of ithas never worked on a PlainText field type. UPDATED: This seems like a bug in the code but there are concerns around fixing this we need to evaluate.
In the mean while, you have two options
What about an HTML field like mine above? I know for a fact this was working.
I dug in further and it looks like code doesn't support adding a global list inside of a SuggestedValue list for HTML or PlainText field types. This doesn't look new, are you sure you used to be able to do this?
In my testing this is what works/doesn't work:
<!-- WORKS -->
<FIELD name="MyTextField1" refname="My.MyTextField1" type="String">
<SUGGESTEDVALUES expanditems="true">
<LISTITEM value="A" />
<LISTITEM value="B" />
</SUGGESTEDVALUES>
</FIELD>
<!-- WORKS -->
<FIELD name="MyTextField1" refname="My.MyTextField1" type="string">
<ALLOWEDVALUES expanditems="true">
<LISTITEM value="C" />
</ALLOWEDVALUES >
</FIELD>
<!-- WORKS -->
<FIELD name="MyTextField1" refname="My.MyTextField1" type="String">
<SUGGESTEDVALUES expanditems="true">
<GLOBALLIST name="Test" />
</SUGGESTEDVALUES>
</FIELD>
<!-- WORKS -->
<FIELD name="MyTextField1" refname="My.MyTextField1" type="PlainText">
<SUGGESTEDVALUES expanditems="true">
<LISTITEM value="A" />
<LISTITEM value="B" />
</SUGGESTEDVALUES>
</FIELD>
<!-- WORKS -->
<FIELD name="MyTextField1" refname="My.MyTextField1" type="HTML">
<SUGGESTEDVALUES expanditems="true">
<LISTITEM value="A" />
<LISTITEM value="B" />
</SUGGESTEDVALUES>
</FIELD>
<!-- FAILS (by design) -->
<FIELD name="MyTextField1" refname="My.MyTextField1" type="PlainText">
<ALLOWEDVALUES expanditems="true">
<LISTITEM value="A" />
<LISTITEM value="B" />
</ALLOWEDVALUES >
</FIELD>
<!-- FAILS (by design) -->
<FIELD name="MyTextField1" refname="My.MyTextField1" type="HTML">
<ALLOWEDVALUES expanditems="true">
<LISTITEM value="A" />
<LISTITEM value="B" />
</ALLOWEDVALUES >
</FIELD>
<!-- FAILS (THIS IS A BUG) -->
<FIELD name="MyTextField1" refname="My.MyTextField1" type="PlainText">
<SUGGESTEDVALUES expanditems="true">
<GLOBALLIST name="Test" />
</SUGGESTEDVALUES>
</FIELD>
<!-- FAILS (THIS IS A BUG) -->
<FIELD name="MyTextField1" refname="My.MyTextField1" type="HTML">
<SUGGESTEDVALUES expanditems="true">
<GLOBALLIST name="Test" />
</SUGGESTEDVALUES>
</FIELD>
I am looking at fixing the SV with suggested value issue. Will let you know if it is doable and timeframe.
100% certain. What's even more interesting is that it still works in our test environment. The global list in production must've gone over that 255 character limit.
Can you share the exact xml you are using? And the global list?
On Mon, Oct 9, 2017, 12:36 PM John D. Shkolnik notifications@github.com wrote:
100% certain. What's even more interesting is that it still works in our test environment. The global list in production must've gone over that 255 character limit.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Microsoft/vsts-extension-multivalue-control/issues/30#issuecomment-335264519, or mute the thread https://github.com/notifications/unsubscribe-auth/AASlGhGz2EjXgkluMoue49GR8BXyWug2ks5sqnXPgaJpZM4PUfdT .
@mmanela Where did we leave off with this problem?
I have been able to get this to work with our TFS 2017.3 on-prem. It show's correctly in TFS Web & Visual Studio.
##Field##
<FIELD name="SDLC" refname="TN.SDLC" type="String" reportable="dimension">
<HELPTEXT>SDLC.</HELPTEXT>
<SUGGESTEDVALUES expanditems="true">
<GLOBALLIST name="TN - SDLC" />
</SUGGESTEDVALUES>
</FIELD>
##Web Layout##
<ControlContribution Label="SDLC" Id="ms-devlabs.vsts-extensions-multivalue-control.multivalue-form-control">
<Inputs>
<Input Id="FieldName" Value="TN.SDLC" />
</Inputs>
</ControlContribution>
@mmanela Has this been fixed? to me it looks that you just closed this, there is no new version in https://marketplace.visualstudio.com/items?itemName=ms-devlabs.vsts-extensions-multivalue-control - or do you need TFS 2017.3 ?
The example from Scott-Emberson uses a String field.
You wrote earlier:
<!-- FAILS (THIS IS A BUG) -->
<FIELD name="MyTextField1" refname="My.MyTextField1" type="PlainText">
<SUGGESTEDVALUES expanditems="true">
<GLOBALLIST name="Test" />
</SUGGESTEDVALUES>
</FIELD>
<!-- FAILS (THIS IS A BUG) -->
<FIELD name="MyTextField1" refname="My.MyTextField1" type="HTML">
<SUGGESTEDVALUES expanditems="true">
<GLOBALLIST name="Test" />
</SUGGESTEDVALUES>
</FIELD>
Trying to use SuggestedValues from GlobalList gives error TF201067 when loading WIT to TFS2017.2
If I have the ListItem values for SuggestedValues under the Field definition in the WIT, it works.
However, when I move the same ListItem values under a GlobalList definition and try to use that GlobalList from the same Field definition, then WIT import fails and gives unrelated error message: "TF201067: You do not have permission to modify the work item type or field. You must have permission to modify work item types and fields in each team project where they are used. If you have the necessary permissions, your work item metadata cache may be out of date. Refresh any cached metadata and try the operation again."
Definitely, the error message is unrelated, because if I immediately move the ListItem values back to the SuggestedValues under the Field definition in the WIT, it works without issues.
It is important to be able to define the SuggestedValues as a GlobalList.
I suppose we use the latest version of the vsts-extension-multivalue-control (I did not check), because we installed it couple of days ago.
--Markus