It's all about the answers!

Ask a question

When delivering how can I require that A certain workitem type is being used and it is in a certain state?


Bob Ferguson (891139) | asked Jan 30 '19, 11:45 a.m.
 I am using RTC 6.0.5 with the SCRUM template.  
I have been asked to allow deliveries to happen only if the following is true:
1) Must be associated with a work item either new or existing.
2) The work item type is Story or Task
3) The task is in an active state (for example: New or In Progress for a Task work item)
4) It is for the current sprint.
I believe that I do this some how in the Project or Team configuration Operation Behavior but I cannot see how to enforced these pre conditions for a delivery action.
Thanx in advance for the help

Accepted answer


permanent link
Geoffrey Clemm (30.1k33035) | answered Feb 04 '19, 4:59 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

You should be able to use the built-in conditions:

Require-Work-Items-and-Comments for (1) and (4)
Require-Work-Items-To-Match-Query for (2) and (3) 

Bob Ferguson selected this answer as the correct answer

Comments
Ralph Schoon commented Feb 05 '19, 2:16 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Yes, you can chain them, but as far as I can tell, it is impossible to require one work item has all the properties. With that approach you will also satisfy the conditions with two work items, one that satisfies 1 and 4 and one with 2 and 3. 


Geoffrey Clemm commented Feb 11 '19, 11:16 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

And if you have more than one work item linked to a change set, you have to decide whether you want:

- all of the work items to satisfy all of the conditions, 
- at least one of the work items to satisfy all of the condiditons
- each of the conditions to be satisfied by at least one of the work items

One other answer



permanent link
Ralph Schoon (63.1k33646) | answered Jan 30 '19, 11:58 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Jan 30 '19, 12:00 p.m.

 You have to create your own custom advisor similar to this one.


https://rsjazz.wordpress.com/2012/11/01/restrict-delivery-of-changesets-to-workitem-types-advisordelivery-of-changesets-associated-to-wrong-work-item-types-advisor/

You would have to have additional checks for the work item that is linked.

The built in precondition does not check for the work item type.


Comments
Bob Ferguson commented Jan 30 '19, 1:02 p.m.
 I need to see if they will allow me to create a custom advisor.  If they are willing to forget about the work item type how do I do the other conditions:
1) Work Item must exist or be created.
2) The Work Item is in an particular state(s).
3) The Work Item is for the current sprint.

Ralph Schoon commented Jan 31 '19, 2:35 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

See com.ibm.team.filesystem.service.internal.ServerRequireWorkItemAdvisor once you are doing the extension workshop.  See https://rsjazz.wordpress.com/2015/09/30/learning-to-fly-getting-started-with-the-rtc-java-apis/.


1) If there is no work item (of that type) linked, fail
2) Test the state of the work item, fail
3) Figure out what the current sprint is and check the work item that is linked (see example of internal code above)

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.