It's all about the answers!

Ask a question

Server extension api - Find out if IIteration object is set as backlog

Sian O'Briain (35921) | asked Mar 15 '17, 12:57 p.m.

I am using SDK 6.0.3

I want to find out if the planned for field of a work item is set to the backlog....I don't think this is possible using IIteration methods, can you advise?

One answer

permanent link
Ralph Schoon (63.2k33646) | answered Mar 16 '17, 4:27 a.m.

I have spent some minutes searching the SDK for  public boolean isBacklog(); Note: you can do things like that too. I only have the SDK that anyone else has.

The method is found in . Note the Interface is a different one you use. It is a special adoption for agile planning. There are other interesting code pieces e.g. .

You can probably find out if an iteration is a backlog iteration given the hints above, but I have no code for it.

Sian O'Briain commented Mar 16 '17, 12:21 p.m.

Thank you!
I was using:
Your suggestion should work fine and I have also figured out how to do the full search and update the to make the relevant plugins available. Thanks again

Sian O'Briain commented Mar 16 '17, 12:41 p.m.

hmm the problem I now face is that I am getting the IIterationHandle using the workItem getTarget() method. It seems this handle can't be used with

IIteration new_iteration = (IIteration) itemService.fetchItem(workItemNewState.getTarget(), IRepositoryItemService.COMPLETE);

causes an error: incompatible with

Ralph Schoon commented Mar 16 '17, 1:24 p.m.

 What you are seeing is that the apt - agile planning tools domain has its own API. It also has its own flavor data for parts of the data model. There seem to be ways to get the data connected, but that would be in the* package code. 

The other issue here is, that the agile planning does not have aa real API and you will end up using classes that are internal.  I published one example here: 

I can't really help you without spending a lot of my own time digging into the API. You definitely need the RTC SDK set up and be able to see into the code that comes with the the SDK to do this.

Sian O'Briain commented Mar 16 '17, 1:55 p.m. | edited Mar 16 '17, 1:57 p.m.

thanks I went a bit further and used the service you mentioned above:

ProcessItemResolver processResolver = (ProcessItemResolver) service.getService(ProcessItemResolver.class);

then the method:

However I get the warning:
Discouraged access: The type ProcessItemResolver is not accessible due to restriction on required library /Users/sianob/rtc603/RTC-SDK-Server-6.0.3/plugins/

And when I deploy I get an unresolved compilation error. I am tempted to use an iterationType instead. I will set up my environment correctly (using the changes you mentioned for 6.0.3 in your blog) so I can debug properly. Thanks

Ralph Schoon commented Mar 16 '17, 4:54 p.m. | edited Mar 16 '17, 5:17 p.m.

The warning tells you not to touch the API, because it is internal - as I mantioned above.

You have two options:

  1. Put in an ignore annotation, be aware that an internal API can change and ignore the warning
  2. Find another way

I would go with 1 if I where you.

Ralph Schoon commented Mar 17 '17, 4:08 a.m. | edited Mar 17 '17, 4:14 a.m.

 I am not sure about the compilation error. You should test this stuff on Jetty if it is a server extension.

6.0.3 unfortunately the updated extensions workshop for 6.0.3 has not yet be published due to other site maintenance going on.

showing 5 of 6 show 1 more comments

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.