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

Community email notifications are disrupted. While we are working to resolve, please check on your favorite boards regularly to keep up with your conversations and new topics.

How to change order of states in a new promotion request Target Promotio State drop down list?

danders238
13-Aquamarine

How to change order of states in a new promotion request Target Promotio State drop down list?

Version: Windchill 11.1

 

Use Case: I would like to reorder the Target Promotion state in the drop down list being shown for a New Promotion Request to match the order in the Life Cycle Template.


Description:

I have added custom states to our windchill install.

This is the order of the states in the life cycle template

danders238_0-1718123750058.png

This is the order they are showing up in the New Promotion Request drop down list

danders238_1-1718123811410.png

How do you change the order in the drop down list to match the Life Cycle Template?

I would like the drop down list to read as the following:

 

In Development

Proven

Released

Obsolete

 

Thanks for any help you may provide,

Don A

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @danders238 

Unfortunately, the DataUtility that cares how to display the list, sorts it just by String so there is no option how to change it by any configuration. 

You could just rewrite the DataUtility where you sort the list as you need.

So only customization can change the behavior.

com.ptc.windchill.enterprise.maturity.dataUtilities.PromotionStateSelectionDataUtility

PetrH

View solution in original post

8 REPLIES 8
BenLoosli
23-Emerald II
(To:danders238)

While those may be all of your lifecycles, do you really allow promotions to all of those states.

We have our system set up so they can only promote to a valid state.

Design is the initial state, These can only be promoted to Prototype and use an alpha revision.

When they got to production, we revise to Rev 0 and then do a set state to Pre-Release. Pre-Release can only be promoted to 1 of 2 states, Released or Verification Required. 

A revise to an object at Prototype goes to Design. A revise to a Released or Verification Required go to Pre-Release. Bot at the next revision in the revision file.

 

danders238
13-Aquamarine
(To:BenLoosli)

Back to my original question, Where do I control the order of the states in the drop down list?
This is an experiment on a test server.

 

Current Life cycle used only allows one to go to Released or Obsolete.

We may have an initial design that never gets released and is replaced with a better design so the old design will go straight to Obsolete or a new design may go straight to a released status for parts to be quoted and or made.

 

Looking at if we need 2 separate promotion requests workflows to allow manufacturing to manage their CNC models which would use all of the states in the list.

 

Thanks,

Don Anderson

 

BenLoosli
23-Emerald II
(To:danders238)

It looks like that list is displayed alphabetically, so it may be hard coded in Windchill.

Have you looked at the code behind the page display to see if it is coded that way.

Hi @danders238 

You could try to set order by enumstomization in wtCustom (wt\lifecycle\StateRB)

https://www.ptc.com/en/support/article/CS366297

 

RELEASED.value=Released
RELEASED.shortDescription=Released state
RELEASED.order=4

OBSOLETE.value=Obsolete
OBSOLETE.shortDescription=Obsolete state
OBSOLETE.order=5

 

 If you use Windchill 12.1+ you can modify it in a website UI

 

This is just advice to try. Iam not sure if it would work but It can 😄

I do not know an another way how to change the order in the list instead of customization. 

PetrH

Hi PetrH,

I tried what you mentioned and found the drop-down list to still be out of order.

Using OBSOLETE.order=5 with the states now has them showning up in the enumCustomize utility in the correct order but not in the drop-down list.

Any other ideas, or will we need to change the source code for the page?

 

Thank you,

Don A

Hi @danders238 

Unfortunately, the DataUtility that cares how to display the list, sorts it just by String so there is no option how to change it by any configuration. 

You could just rewrite the DataUtility where you sort the list as you need.

So only customization can change the behavior.

com.ptc.windchill.enterprise.maturity.dataUtilities.PromotionStateSelectionDataUtility

PetrH

Hi PetrH,

 

Thank you for your suggestions!  I will look into either renaming the text that's being sorted by or rewriting the utility.

Might go with changing the text that's being sorted by as that require less work as additional windchill updates are rolled out by PTC.

 

Thank you,

Don A

@danders238 

I saw your post and thought it would be fun to figure out.

It's doable for sure.

 

In my example I used the OOTB lifecycle

d_graham_0-1718366351062.png

 

Using OOTB sorting Promotion State looks like this.

 

d_graham_1-1718366431713.png

 

After adding customization sorting Promotion State look like this.

Note the order is the same as the LifeCycleTemplate. 😀

d_graham_0-1718451133190.png

 

This was a fun one to figure out for sure.  Keep 'em coming!

 

A word to the wise, I did examine the OOTB code that displays this and OOTB it is sorted alpha-numerically in the code. So, no matter what you do upfront OOTB it will still be sorted alpha-numerically.

 

David

Top Tags