It's all about the answers!

Ask a question

Should not allow RTC work item to close until linked git merge request (Pull request) is merged


Chandra Prakash k (21215) | asked Mar 24 '22, 1:47 a.m.

we have registered the EWM project area with Gitlab repo for android source control development. 


in one of the audit we found that developers are closing the Task/Defect, before merging the associated merge request. resulting, when lead tries to merge the changes, hooks restricting that closed work item should not be used when merge or commits happen.

So we would like to know if there is any out of the box or workaround available to control closing the work item when linked merge request is in open state.

Regards,
Chandra Prakash

One answer



permanent link
Ralph Schoon (63.3k33646) | answered Mar 24 '22, 3:40 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Mar 24 '22, 3:41 a.m.

 To control anything like that, would require to configure some kind of precondition/advisor in EWM Process Configuration Team Configuration>operation Behavior (Web UI Preconditions & Follow-up Actions).


There are operations available for "Git" and for "Save Work" Item that could be relevant for this. There is no "save work item" precondition that I can see that would allow to guard this.

I do not know what operation you want to actually guard. For GIT there is only a set of preconditions available for GIT Push. First I would consider to enable "Restrict Association to Closed Work Items". But that does not help with the case where the users close the work item after it was associated. 

You could enable Require Work Items to Match Query and the query only return the work items that are open.

If that is not good enough you could check if the Jazz Community Git Connector see https://github.com/jazz-community/rtc-git-connector also see https://github.com/orgs/jazz-community/repositories?type=all for all projects, provides something.

If this still does not provide with anything, it is possible to write custom preconditions for "Save Work Item" operations. I don't know if that is realistic as I do not know the GIT APIs. The work item save could check if there is a link to a GIT item and check the status of said item and prevent the state change.


Comments
Ralph Schoon commented Mar 24 '22, 4:04 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I am sorry, I realize you meant the PULL request. I do not see a way to configure any operation behavior for the Pull request. It might be possible to create custom operation behavior for save work item preventing the work item state change based on the state of a liked GIT thing. Not sure though.  


Chandra Prakash k commented Mar 24 '22, 7:27 a.m.

Thank you Ralph for your comments on my requirement. 

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.