It's all about the answers!

Ask a question

validator for iteration name


Vivek Pandey (4321738) | asked Oct 12 '16, 5:30 a.m.
 Is it possible to put validators for Iteration (sprint names) in RTC V6.0.2.

Comments
Ralph Schoon commented Oct 12 '16, 7:13 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

What would be the purpose/use case for such a validator? See How should I ask a question in the Forum if I want to receive useful answers?


Vivek Pandey commented Oct 14 '16, 4:16 a.m.

thanks for the notes Ralph , I did not want to make question too lengthy for it to be ignored for complexity.


anyways, here is the situation:
we are using process sharing between RTC project areas, such that we have 1 provider project area and multiple consumer project areas.

for the purpose of standardizing sprint names & ease of central reporting, we want all teams to follow same naming convention for sprints in their respective project areas.

Please let me know in case of anything else.


Miguel Tomico commented Oct 14 '16, 5:49 a.m. | edited Oct 14 '16, 5:53 a.m.

Well... implementing a validation is technically possible by developing a server-side script, but that requires development effort + testing + deployment, etc.

The point here is... is it worth it?

Bear in mind that only a subset of your user-base should have permission to modify Team Areas and Iterations, so maybe it would be easier to educate them in the naming convention you want to use.

Accepted answer


permanent link
Miguel Tomico (5001423) | answered Oct 14 '16, 6:25 a.m.
edited Oct 14 '16, 6:35 a.m.

As discussed, I really would consider other options before going this route. Nevertheless,

The operation he should be looking at is:

<project-operation id="com.ibm.team.process.server.saveProjectArea">

Here's some code to start with:

public class IterationSaveOperationParticipant extends AbstractService implements IOperationParticipant {

@Override
public void run(AdvisableOperation operation,
  IProcessConfigurationElement participantConfig,
  IParticipantInfoCollector collector, IProgressMonitor monitor)
  throws TeamRepositoryException {
 
 if (operation instanceof ProjectAreaSaveOperation)
 {
  ProjectAreaSaveOperation operationData = (ProjectAreaSaveOperation) operation;

  List<IProcessItem> savedItems = Arrays.asList(operationData.getSavedItems());
   for (IProcessItem savedItem : savedItems)
  {
   if (savedItem.getProcessItemType() == IProcessItem.ITERATION)
   {
    IRepositoryItemService itemService = getService(IRepositoryItemService.class);

    IIteration newIteration = (IIteration) savedItem;

   ...validate here newIteration.getName()...

Ralph Schoon selected this answer as the correct answer

Comments
1
Ralph Schoon commented Oct 14 '16, 6:39 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Good one. Not sure why I missed it. Agree with your assessment.


Ralph Schoon commented Oct 14 '16, 6:59 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

One other answer



permanent link
Ralph Schoon (63.4k33646) | answered Oct 14 '16, 5:59 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I am getting tired to try to dig up the basic information necessary to understand the question and tend to not try to answer any more. It you want answers See How should I ask a question in the Forum if I want to receive useful answers? Most contributors here don't have the time to pry the info out of the asking user.

In general, it is possible to write process advisors. But you need an operation that you can use. I am not sure there is such an operation. These are the ones available: https://jazz.net/wiki/bin/view/Main/CustomPreconditionsTable#operations

 

Comments
Miguel Tomico commented Oct 14 '16, 6:33 a.m. | edited Oct 14 '16, 6:36 a.m.

@rschoon,

I agree the 'quality' of the questions has degraded over the last years, but please keep contributing. Your blog posts and answers in the forum are priceless :-)

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.