cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

We are happy to announce the new Windchill Customization board! Learn more.

Adding columns to display on home page - My Tasks

GregOlson
15-Moonstone

Adding columns to display on home page - My Tasks

Does anyone know where I have to go to add a column to the list of available columns when customizing a My Tasks table view? I was able to add the column on our Change Notices page (browse>changes>change notices). I just need to display on people's home page. Currently it's not listed in the available columns to add.

Thanks in advance,

Greg

1 ACCEPTED SOLUTION

Accepted Solutions
GregOlson
15-Moonstone
(To:GregOlson)

From our consultants:

1. Edit AvailableAttributes.xml Windchill\codebase\com\ptc\core\htmlcomp\createtableview\AvailableAttributes.xml and add following lines under WorkItem (Add highlighted lines)

<Class name="wt.workflow.work.WorkItem">
<Include name="wt.fc.Persistable"/>
<Include name="wt.ownership.Ownable"/>
<Attribute id="completedBy"/>
<Attribute id="name"/>
<Attribute id="reassigned" type="boolean"/>
<Attribute id="required" type="boolean"/>
<Attribute id="role" type="list" enumClass="wt.project.Role"/>
<Attribute id="workItemStatus" schemaId="status" type="list" enumClass="wt.workflow.work.WfAssignmentState"/>
<Attribute id="containerName"/>
<Attribute id="workitem_pbolink"/> <Attribute id="SaledOrderDescriptionWorkItem">
<Label resource="ext.mb.MBResource" key="SALES_ORDER_DESCRIPTION_LABEL"/>
</Attribute>
<Attribute id="SalesOrderNumberWorkItem">
<Label resource="ext.mb.MBResource" key="SALES_ORDER_NUMBER_LABEL"/>
</Attribute>

</Class>

2. Edit the Windchill\codebase\com\ptc\windchill\enterprise\enterpriseui.dataUtilities.properties.xconf and add the following lines under the <Service name="com.ptc.core.components.descriptor.DataUtility"> tag:
<Option serviceClass="ext.mb.CustomChangeNoticeAttributeDataUtility"
requestor="java.lang.Object"
selector="SaledOrderDescriptionWorkItem"
cardinality="singleton"/>

<Option serviceClass="ext.mb.CustomChangeNoticeAttributeDataUtility"
requestor="java.lang.Object"
selector="SalesOrderNumberWorkItem"
cardinality="singleton"/>


3. Run "xconfmanager -p" to propagate the changes.

4. Place the DataUtility files under Windchill/src/ext/mb folder (create folders if necessary)

5. Execute the below command to compile the classes:
tools class -Dclass.includes=ext\mb\**

6. Restart the server and add the column to the view.

Works Great!!

View solution in original post

18 REPLIES 18

Right next to "My Task" is a drop down, you can select "customize" and create your own view with any columns you want.

tasks.png

James,

I am asking how to add a column to the available columns list....

column.gif

Sorry I misunderstood. Too bad, here I was thinking I may have actually solved someones windchill problem. I don't have an answer for that problem.

akr
1-Newbie
1-Newbie
(To:GregOlson)

Create an alias/calculated attribute on "Work Item" type from type and atribute manager. Then you can see the attribute added under "Available columns" list which can be selected.

MikeLockwood
22-Sapphire I
(To:akr)

Just carefully tried this - cannot see my new test column. A few screen captures would really help. What info can you include in such an attribute for a work item (task).

thank you

The images are from Windchill 10.2 intance.

Created an alias attribute 'CNNumber' on Work Item type

Capture.GIF

Capture.GIF

Capture.GIF

http://www.ptc.com/cs/help/windchill_hc/wc102_hc/index.jspx?id=OrgAdminChp_BestPracticeDisplayAliasAttrOnMyTaskTable&action=show

GregOlson
15-Moonstone
(To:akr)

Ashwini,

I am struggling with the mapping field...this attribute is something we created (we have customized CR and CN forms). Do you know were I would look for the mapping info?

akr
1-Newbie
1-Newbie
(To:GregOlson)

You can refer the below link for mapping information

http://www.ptc.com/cs/help/windchill_hc/wc102_hc/index.jspx?id=TypeMgrAttrAliasMap&action=show

In my case the mapping entry is 'primaryBusinessObject^wt.change2.WTChangeOrder2~number'

MikeLockwood
22-Sapphire I
(To:akr)

Images very helpful. What is the exact text in the "mapping" field please?

Mike,

He has it listed above...primaryBusinessObject.....

My case is a little different as I want to display a column that is custom. I was told by my consultants that what PTC is devised is overly complicated and not necessary. I am getting step by step instructions for what we will be doing. I'll post them once I receive.

GregOlson
15-Moonstone
(To:akr)

Ashwini,

How would the mapping change if I wanted to display a simple text attribute from the primary business object? Having troubles finding what to enter in the mapping line.

Greg

GregOlson
15-Moonstone
(To:GregOlson)

I also logged a case with PTC, here is the TSE's response:

I have been assigned to look into this issue. After doing further investigation, I have found below steps to add column to users Home -> Tasks table.

  • <WT_HOME>\codebase\WEB-INF\jsp\object\homeAssignments.jsp generates the My Tasks assignment table on Home Page.

  • If ProjectLink is installed the table id assigned is projectmanagement.overview.assignments.list and the table is defined in com.ptc.windchill.enterprise.work.mvc.builders.OverviewPlanAssignmentsBuilder ComponentConfigBuilder.

  • If ProjectLink is not installed the table id assigned is netmarkets.overview.assignments.list and the table is defined in com.ptc.windchill.enterprise.work.mvc.builders.OverviewAssignmentsBuilder ComponentConfigBuilder.

  • Workaround:

o Override/extend the corresponding builder to override the getSpecialTableColumnsAttrDefinition method to add the required column.

o Create a new DataUtility to fetch the column values

Greg,

As long as you are using 10.1 M040 or higher the methodology that Ashwini provided above is the path you should be using. Whether the custom attributes are modeled or typed it will work.

GregOlson
15-Moonstone
(To:JeffZemsky)

I guess I should have specified, we are using 10.0 M040

akr
1-Newbie
1-Newbie
(To:JeffZemsky)

Jeffrey,

I have highlighted in the image which says mapping can be done only for modeled attributes. Please find it in the link http://www.ptc.com/cs/help/windchill_hc/wc102_hc/index.jspx?id=TypeMgrAttrAliasMap&action=show

Please let me know if i am wrong.

Capture.GIF

GregOlson
15-Moonstone
(To:GregOlson)

From our consultants:

1. Edit AvailableAttributes.xml Windchill\codebase\com\ptc\core\htmlcomp\createtableview\AvailableAttributes.xml and add following lines under WorkItem (Add highlighted lines)

<Class name="wt.workflow.work.WorkItem">
<Include name="wt.fc.Persistable"/>
<Include name="wt.ownership.Ownable"/>
<Attribute id="completedBy"/>
<Attribute id="name"/>
<Attribute id="reassigned" type="boolean"/>
<Attribute id="required" type="boolean"/>
<Attribute id="role" type="list" enumClass="wt.project.Role"/>
<Attribute id="workItemStatus" schemaId="status" type="list" enumClass="wt.workflow.work.WfAssignmentState"/>
<Attribute id="containerName"/>
<Attribute id="workitem_pbolink"/> <Attribute id="SaledOrderDescriptionWorkItem">
<Label resource="ext.mb.MBResource" key="SALES_ORDER_DESCRIPTION_LABEL"/>
</Attribute>
<Attribute id="SalesOrderNumberWorkItem">
<Label resource="ext.mb.MBResource" key="SALES_ORDER_NUMBER_LABEL"/>
</Attribute>

</Class>

2. Edit the Windchill\codebase\com\ptc\windchill\enterprise\enterpriseui.dataUtilities.properties.xconf and add the following lines under the <Service name="com.ptc.core.components.descriptor.DataUtility"> tag:
<Option serviceClass="ext.mb.CustomChangeNoticeAttributeDataUtility"
requestor="java.lang.Object"
selector="SaledOrderDescriptionWorkItem"
cardinality="singleton"/>

<Option serviceClass="ext.mb.CustomChangeNoticeAttributeDataUtility"
requestor="java.lang.Object"
selector="SalesOrderNumberWorkItem"
cardinality="singleton"/>


3. Run "xconfmanager -p" to propagate the changes.

4. Place the DataUtility files under Windchill/src/ext/mb folder (create folders if necessary)

5. Execute the below command to compile the classes:
tools class -Dclass.includes=ext\mb\**

6. Restart the server and add the column to the view.

Works Great!!

Hi Greg,

Would you mind sharing your Data Utility file? I am new to windchill and learnng customization.

Thanks

Tem

Hello,  GregOlson, please specify the 4 point where the Data Utility files are located

Top Tags