<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to customize Promotion Request task subject in UI in Windchill Customization</title>
    <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-to-customize-Promotion-Request-task-subject-in-UI/m-p/978344#M8846</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;Is there any api to customize content of Subject of Promotion Request Task?? I was able to change Subject of emaill notyfication. Now I need to do this same i UI.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Gucio_0-1729091014382.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/112589iC530F3914F12CAE4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Gucio_0-1729091014382.png" alt="Gucio_0-1729091014382.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance for any advice.&lt;/P&gt;</description>
    <pubDate>Wed, 16 Oct 2024 15:06:07 GMT</pubDate>
    <dc:creator>Gucio</dc:creator>
    <dc:date>2024-10-16T15:06:07Z</dc:date>
    <item>
      <title>How to customize Promotion Request task subject in UI</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-to-customize-Promotion-Request-task-subject-in-UI/m-p/978344#M8846</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;Is there any api to customize content of Subject of Promotion Request Task?? I was able to change Subject of emaill notyfication. Now I need to do this same i UI.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Gucio_0-1729091014382.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/112589iC530F3914F12CAE4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Gucio_0-1729091014382.png" alt="Gucio_0-1729091014382.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance for any advice.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2024 15:06:07 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-to-customize-Promotion-Request-task-subject-in-UI/m-p/978344#M8846</guid>
      <dc:creator>Gucio</dc:creator>
      <dc:date>2024-10-16T15:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to customize Promotion Request task subject in UI</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-to-customize-Promotion-Request-task-subject-in-UI/m-p/978775#M8858</link>
      <description>&lt;P&gt;Hi &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/6711"&gt;@Gucio&lt;/a&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you for your question!&lt;BR /&gt;&lt;BR /&gt;Your post appears well documented but has not yet received any response. I am replying to raise awareness. Hopefully, another community member will be able to help.&lt;BR /&gt;&lt;BR /&gt;Also, feel free to add any additional information you think might be relevant.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2024 14:32:02 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-to-customize-Promotion-Request-task-subject-in-UI/m-p/978775#M8858</guid>
      <dc:creator>Catalina</dc:creator>
      <dc:date>2024-10-18T14:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to customize Promotion Request task subject in UI</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-to-customize-Promotion-Request-task-subject-in-UI/m-p/978929#M8862</link>
      <description>&lt;P&gt;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/6711"&gt;@Gucio&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is doable to change the OOTB task 'Subject' in the UI.&amp;nbsp; See image below.&lt;/P&gt;
&lt;P&gt;As you can see. ONLY tasks from Promotion Request workflows will get the added text.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="d_graham_0-1729468752342.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/112760iAE9E8C7E63CCBFFD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="d_graham_0-1729468752342.png" alt="d_graham_0-1729468752342.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You never stated EXACTLY how you wanted to change the OOTB display of the task 'Subject' so I just added some static text to show it can be done.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2024 00:01:34 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-to-customize-Promotion-Request-task-subject-in-UI/m-p/978929#M8862</guid>
      <dc:creator>d_graham</dc:creator>
      <dc:date>2024-10-21T00:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to customize Promotion Request task subject in UI</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-to-customize-Promotion-Request-task-subject-in-UI/m-p/979189#M8869</link>
      <description>&lt;P&gt;I will try to explain in more details.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For Promotion Request email notification subject - I've modified&amp;nbsp;General*.html files from&amp;nbsp;codebase\templates\workNotification. As a result new mail subject contains some variable taken from Promotion Request workflow. My gol is to have this same subject for task in UI. Can you guide me what should I do?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Gucio&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2024 06:04:19 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-to-customize-Promotion-Request-task-subject-in-UI/m-p/979189#M8869</guid>
      <dc:creator>Gucio</dc:creator>
      <dc:date>2024-10-22T06:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to customize Promotion Request task subject in UI</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-to-customize-Promotion-Request-task-subject-in-UI/m-p/979279#M8871</link>
      <description>&lt;P&gt;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/6711"&gt;@Gucio&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you tell me the name, display name and data type of each of the variables and EXACTLY how you want them to appear in the 'Subject'?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you keeping the OOTB Subject display and simply appending the variable to it?&lt;/P&gt;
&lt;P&gt;Do you want the variable to be at the start of the 'Subject'?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please be very clear with EXACTLY how you want the 'Subject' to appear.&lt;/P&gt;
&lt;P&gt;A screenshot of your workflow variables and exactly which ones should appear and where/how they should appear in the 'Subject' would be helpful.&amp;nbsp; This would eliminate anymore back and forth on questions on my part.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2024 12:08:03 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-to-customize-Promotion-Request-task-subject-in-UI/m-p/979279#M8871</guid>
      <dc:creator>d_graham</dc:creator>
      <dc:date>2024-10-22T12:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to customize Promotion Request task subject in UI</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-to-customize-Promotion-Request-task-subject-in-UI/m-p/979491#M8877</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My Promotion Request has 5 additional variables:&lt;/P&gt;&lt;P&gt;objectName (String);&lt;/P&gt;&lt;P&gt;objectNumber (String);&lt;/P&gt;&lt;P&gt;objectInitialState (String);&lt;/P&gt;&lt;P&gt;objectTargetState (String);&lt;/P&gt;&lt;P&gt;objectRevision (String).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Parameters are filed/taken from below code defined in expression:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;wt.maturity.PromotionNotice pn = (wt.maturity.PromotionNotice) primaryBusinessObject;

wt.fc.QueryResult queryResult = wt.maturity.MaturityHelper.service.getPromotionSeeds(pn);

wt.lifecycle.State state = null;

while (queryResult.hasMoreElements()) {
                java.lang.Object obj = queryResult.nextElement();
                if (obj instanceof wt.doc.WTDocument) {
                    wt.doc.WTDocument object = (wt.doc.WTDocument) obj;
                    objectName = object.getName();
                    objectNumber  = object.getNumber();
                    state = object.getLifeCycleState();
                    objectCurrentState = state.getLocalizedMessage(java.util.Locale.US).toString();
                    objectTargetState =  pn.getMaturityState().getLocalizedMessage(java.util.Locale.US).toString();
                    objectRevision = wt.vc.VersionControlHelper.getVersionIdentifier(object).getValue();
                }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To customize email subject of “Review” activity, I edited General***.xml files stored in codebase\templates\workNotification folder. Body of file looks as follow:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;body&amp;gt;
&amp;lt;font face="Arial, Helvetica, sans-serif"&amp;gt;
&amp;lt;SCRIPT LANGUAGE=Windchill&amp;gt; activityNotificationUrl &amp;lt;/SCRIPT&amp;gt;
&amp;lt;/font&amp;gt;
&amp;lt;SCRIPT LANGUAGE=Windchill&amp;gt;
&amp;lt;!--
   activityAttributes notification=true
--&amp;gt;
&amp;lt;/SCRIPT&amp;gt;
&amp;lt;SCRIPT LANGUAGE=Windchill&amp;gt;   &amp;lt;!--
  beginSubject 
--&amp;gt;   &amp;lt;/SCRIPT&amp;gt;
&amp;lt;SCRIPT LANGUAGE=Windchill&amp;gt;   &amp;lt;!--
getActivityName
 --&amp;gt;   &amp;lt;/SCRIPT&amp;gt;
 &amp;lt;SCRIPT LANGUAGE=Windchill&amp;gt;   &amp;lt;!--
  addText text=": "  
--&amp;gt;   &amp;lt;/SCRIPT&amp;gt; 
&amp;lt;SCRIPT LANGUAGE=Windchill&amp;gt;   &amp;lt;!--
  getPrimaryBusinessObjectName 
--&amp;gt;   &amp;lt;/SCRIPT&amp;gt;
&amp;lt;SCRIPT LANGUAGE=Windchill&amp;gt;   &amp;lt;!--
  addText text=", "  
--&amp;gt;   &amp;lt;/SCRIPT&amp;gt; 
 &amp;lt;SCRIPT LANGUAGE=Windchill&amp;gt; &amp;lt;!--
getProcessVariable varName="objectName"
--&amp;gt; &amp;lt;/SCRIPT&amp;gt;
&amp;lt;SCRIPT LANGUAGE=Windchill&amp;gt;   &amp;lt;!--
  addText text=", "  
--&amp;gt;   &amp;lt;/SCRIPT&amp;gt;
 &amp;lt;SCRIPT LANGUAGE=Windchill&amp;gt; &amp;lt;!--
 getProcessVariable varName="objectNumber"
--&amp;gt; &amp;lt;/SCRIPT&amp;gt; 
&amp;lt;SCRIPT LANGUAGE=Windchill&amp;gt;   &amp;lt;!--
  addText text="; rewizja "  
--&amp;gt;   &amp;lt;/SCRIPT&amp;gt;
 &amp;lt;SCRIPT LANGUAGE=Windchill&amp;gt; &amp;lt;!--
 getProcessVariable varName="objectRevision"
--&amp;gt; &amp;lt;/SCRIPT&amp;gt;
&amp;lt;SCRIPT LANGUAGE=Windchill&amp;gt;   &amp;lt;!--
  addText text=". Zmiana stanu z: "  
--&amp;gt;   &amp;lt;/SCRIPT&amp;gt;
 &amp;lt;SCRIPT LANGUAGE=Windchill&amp;gt; &amp;lt;!--
 getProcessVariable varName="objectCurrentState"
--&amp;gt; &amp;lt;/SCRIPT&amp;gt;
&amp;lt;SCRIPT LANGUAGE=Windchill&amp;gt;   &amp;lt;!--
  addText text=" na "  
--&amp;gt;   &amp;lt;/SCRIPT&amp;gt;
 &amp;lt;SCRIPT LANGUAGE=Windchill&amp;gt; &amp;lt;!--
 getProcessVariable varName="objectTargetState"
 --&amp;gt; &amp;lt;/SCRIPT&amp;gt;
&amp;lt;SCRIPT LANGUAGE=Windchill&amp;gt;   &amp;lt;!--
endSubject 
--&amp;gt;    &amp;lt;/SCRIPT&amp;gt;
&amp;lt;/body&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As a result, reviewer receive email notification with subject, that is formatted as it was done in General***.xml file. All necessary variables are taken from expression and are used as part of subject.&lt;/P&gt;&lt;P&gt;Subject: (it is written in polish)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Gucio_0-1729677456791.png" style="width: 999px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/112916iF2D581D7CA66252D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Gucio_0-1729677456791.png" alt="Gucio_0-1729677456791.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But this same user in UI receive task with OOTB subject. I would like to change it. The goal is to have same subject pattern as in email.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope not it will be easier to understand my expectations.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2024 10:08:53 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-to-customize-Promotion-Request-task-subject-in-UI/m-p/979491#M8877</guid>
      <dc:creator>Gucio</dc:creator>
      <dc:date>2024-10-23T10:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to customize Promotion Request task subject in UI</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-to-customize-Promotion-Request-task-subject-in-UI/m-p/979607#M8881</link>
      <description>&lt;P&gt;Krzysztof,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have this working to your spec.&amp;nbsp; I think.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I made a workflow that has an expression robot with your code and the String variables you listed.&amp;nbsp; BTW, I had to add an additional variable that was in your code by not listed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I edited the data utility that generates the Task 'Subject' to find the workflow variables you listed and get their values.&lt;/P&gt;
&lt;P&gt;My code appends the variables' &amp;lt;name&amp;gt; = &amp;lt;value&amp;gt; to the OOTB subject.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Seems to be bombproof.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can't read Polish so I don't know if the image below is exactly what you need but it does show that the workflow variables' values can be added to the Subject.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="d_graham_0-1729704751493.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/112947i72D1357F5716E472/image-size/medium?v=v2&amp;amp;px=400" role="button" title="d_graham_0-1729704751493.png" alt="d_graham_0-1729704751493.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2024 17:45:31 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-to-customize-Promotion-Request-task-subject-in-UI/m-p/979607#M8881</guid>
      <dc:creator>d_graham</dc:creator>
      <dc:date>2024-10-23T17:45:31Z</dc:date>
    </item>
  </channel>
</rss>

