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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Iteration comment

cc-2
6-Contributor

Iteration comment

Hello

is there an option or an easy to set up Windchill (9.1 M050) so that a data cannot be checked in if the field Iteration Comment is left blank ?

Thanks in advance

3 REPLIES 3
RajuPulavarthi
4-Participant
(To:cc-2)

We ended up adding a client side JavaScript function to enforce the comments in the jsp page (checkin_step.jsp) and added it to the definition of the Checkin step (in custom-actions.xml) so that this function will be called when user checks it in.


<script type="text/javascript">
function validateCheckinComments(){
<%boolean isDoc=wt.doc.WTDocument.class.isAssignableFrom(obj.getClass());
if( isDoc){
%>
var comments = getElementByName('comment');
if( comments == null || comments.value == null || (comments.value=comments.value.replace(/^\s+|\s+$/g,")).length==0){
alert('Comments are required to checkin a document.');
return false;
}
<% }
} %>
return true;
}
</script>

<action name="checkin_step" ajax="row" afterjs="validateCheckinComments">

Raju Pulavarthi

what kind of objects? we use a checkin trigger so you can enforce this
even for workflows etc.

cheers, martin

cc-2
6-Contributor
(To:cc-2)

Hello

thank you all for your prompt replies

It would be for EPMdocs and WTdocs (including subtypes).

Best regards


Top Tags