It's all about the answers!

Ask a question

Can't upload attachments.


Manuel Felipe Amaya (1321527) | asked Aug 03 '15, 2:07 p.m.
Hi,

When trying to upload attachments in a WI that has the attribute "Filed Against" assigned to a category that is related to a Team Area, the attachment fails to get uploaded.

I have some preconditions and follow ups (I extended the functionality) at the workitem save operation.

Please help me identifying the mistake I´m incurring into.
Thank you.

2 answers



permanent link
Ralph Schoon (63.6k33646) | answered Aug 03 '15, 2:37 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Aug 03 '15, 2:38 p.m.
Create a new role for the uset that uploads. Disable all operational behavior for that role. Upload and enable one behavior at a time.

If you are unable to provide the details, that is the only way.

Eben the Plain Java Client Libraries can print exceptions that appen due to preconditions.

Comments
Manuel Felipe Amaya commented Aug 03 '15, 3:41 p.m. | edited Aug 03 '15, 3:46 p.m.

Thank you for your fast response.

I did as you recommended and found that it doesn't matter if there is just one extension or many, with every one of them the problem is happening.

I failed to tell the last time that this is only happening in the web client. In the eclipse client the workitem save operation works ok.

I'm currently running more tests in the jetty server.


Ralph Schoon commented Aug 04 '15, 2:08 a.m. | edited Aug 04 '15, 2:09 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

You also failed to provide the error message you see, which is the minimum needed to have any hope to help you.
Also, is it any user or just you, is it any browser? Did you delete the browser history?


permanent link
Manuel Felipe Amaya (1321527) | answered Aug 05 '15, 12:21 p.m.
edited Aug 05 '15, 12:22 p.m.
Hi,

Finally found what was wrong with the extensions.
First the response to your questions:
  • It didn't show the error on the web client, which is where the problem happened.
  • It happened at every browser.
  • I did delete browser history and cache.

The problem was that attachments also trigger the WorkItemSave operation when created. It seems that they behave as WI for some things but not for others.

I added the following line of code after validating the operation of every extension:

if (saveParameter.getNewState() instanceof IWorkItem) {

Maybe it should be added to the extensions workshop as we made some test with that plugin in order to understand what we did wrong and it also happened.


Thank you


Comments
Ralph Schoon commented Aug 05 '15, 12:43 p.m. | edited Aug 05 '15, 12:49 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

The workshop does that test for all relevant cases in its context.


If you upload an attachment to a work item in a participant, you have to save it - which triggers the operation behavior again - for the work item you upload to. You can see a description for how to deal with that here https://rsjazz.wordpress.com/2012/07/31/rtc-update-parent-duration-estimation-and-effort-participant/ see additional save parameters.

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.