Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Warning during WorkItem link deletion

Is there the possibility (also with a plugin) to display an alert when a work item link is deleted?


Thanks in advance.
Bye

0 votes



2 answers

Permanent link

Angelo,
I would write a follow-up action on work item save that does the following:

  1. retrieve all links that have been deleted during the current action;
  2. if this deleted links set is not null, send an alert.
Point 1 can be addressed by using the method getDeletedReferences (for each endPointDescriptor)

List<IReference> removedReferences = new ArrayList<IReference>();
IWorkItemReferences refs = saveParameter.getNewReferences();
removedReferences = refs.getDeletedReferences(endPointDescriptor);

I have no ready-to-use examples, instead, for point 2.

0 votes

Comments

Luca,

thanks for your response but my request is a little different.
I don't want a notification during the save but a warning when I delete a link. Is it possible?

Bye.

Angelo,
I would define a check attribute on the work item, basically a flag, that must be checked to enable links deletion.
An advisor should read this attribute on work item save and return a validation error if it is not flagged and a link has been deleted.
In order for the "warning" mechanism to work, this attribute should be unflagged every time a new action on the work item begins, or simply after a positive check (that is, first you check whether the attribute is flagged; if it is not, return an error; if it is, unflag the attribute and let the action complete without errors).

Sorry, a follow-up action, rather than an advisor, would better perform this check.

Follow up action are not what should be used to prevent saving in such a case. A pre-condition or advisor should be used.

The design with the flag does not seem to be a good one. Way too complex and annoying. You will also have all the attribute changes in the work item history.

I don't know if there is a good way to implement this.

Regardless of the considerations about the complexity of the solution, perhaps the only way to implement it is to develop both an advisor (to perform the check), and a participant (follow-up action) to unflag the attribute after any action.

I have not been able to come up with a better solution.

In the Eclipse client there is a feature to override some of theĀ  advisors. I am not sure if that is available in the web UI.

Another thought was to use additional save parameter to communicate but I have not found a real scenario either.

showing 5 of 7 show 2 more comments

Permanent link

The simple answer is no. The UI is not even built for pop up windows.
You can use an advisor to prevent saving, It will show an error on the work item editor and/or in the Eclipse process advisor, but that is about it.

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,936

Question asked: Oct 12 '17, 12:06 p.m.

Question was seen: 2,069 times

Last updated: Oct 17 '17, 7:11 a.m.

Confirmation Cancel Confirm