Should not allow RTC work item to close until linked git merge request (Pull request) is merged
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
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
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.
Thank you Ralph for your comments on my requirement.