integration with other plugins

Ariadne IT13374030156 February 5, 2013

I see a problem with the time sheet gadget.

I installed "ictime" plugin that extends the work log form. So when I click on a blank entry on the gadget to add a log work for that date, it calls the extended form and I get an error on a missing parameter (I think that the form needs a mandatory parameter that the simple form doesn't).

The first lines of stack trace are:

Causa:
java.lang.NumberFormatException: For input string: ""

Stack Trace: [hide]

java.lang.NumberFormatException: For input string: ""

at java.lang.NumberFormatException.forInputString(Unknown Source)

at java.lang.Integer.parseInt(Unknown Source)

at java.lang.Integer.parseInt(Unknown Source)

at de.iconcept.ictime.actions.timeentry.ExtendedCreateTimeEntry.doValidation(ExtendedCreateTimeEntry.java:162)

at webwork.action.ActionSupport.validate(ActionSupport.java:391)

at webwork.action.ActionSupport.execute(ActionSupport.java:162)

at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:82)

What can I do to work around this problem?

Thank you

2 answers

1 accepted

0 votes
Answer accepted
Tobias Reibling
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 5, 2013

Hi,

We do not know the JIRA Timesheet Plugin, and we do not claim that ictime works with this plugin and vice versa (mostly people only use one time tracking tool at a time). We do not expect conflicts with ictime as long as another plugin only analyses JIRA data (ictime also writes normal JIRA work logs), but at the moment the other plugin offers an own way to log work or modify work logs, there might be problems (it is e.g. definitely not possible to use ictime and Tempo at the same time in a way that makes sense).

I will have a chat with one of the programmers within the next days and we will have a look if we can find a non-correct behaviour in ictime or if in fact the thing you want to do simply can't work. I will come back to you when I know more.

In the meantime it would help us to have a detailed description of what you are doing to reproduce your problem (screenshots? - as I told you, we really do not know the JIRA Timesheet Plugin and it's functionality). And please provide the complete stacktrace (you also might send this data to our support: see https://marketplace.atlassian.com/plugins/de.iconcept.ictime.jira-ictime/version/232/support).

Best regards

Tobias

Andriy Zhdanov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 5, 2013

Hi Tobias,

From customer description it is obvous that timeLogged request parameter is missing for CreateWorkLog.jspa url from timesheet plugin. Is it possible to set some meaningful value to make it work?

Thank you.

Ariadne IT13374030156 February 6, 2013

UPDATE: the unhandled validation error is for the parameter "activity".

If I append activity=0 to the query string I get the form with correctly handled errors

Then if I use the form and submit a time log, I get an error 404 because a redirection to

/secure/$action.getCancelUrl()

I think that some other parameter i missing...

but the time is correctly logged

jtw-ic February 6, 2013

Hi Ariadne,

I checked the code and there are indeed some unhandled errors which occur due to the missing parameters when calling the CreateWorklog.jspa from some gadgets. Integration with other gadgets/plugins is always difficult, but I agree that the errors should be handled correctly. We will look into that.

Tobias Reibling
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 7, 2013

Hi,

As we had to do a bugfix release today anyway, we have addressed the unhandled exceptions, too. Just have a look at version 2.3.3. So you should no longer run into exceptions. However, parameters that are mandatory from an ictime point of view still need to be provided in order to create/edit a work log. Example: If you did not deactivate activity times in ictime, you won't be able to create a work log via the JIRA Timesheet Plugin within providing a valid activity type. Hope this helps.

Tobias

Ariadne IT13374030156 February 7, 2013

thank you Tobias. I upgraded to 2.3.3 and it works. A last problem remains: the return url doesn't work.

the sequence is:

1) call the log form from the time sheet gadget

1b) the url called is for instance: http://HOST/secure/CreateWorklog.jspa?id=10474&startDate=04%2F02%2F2013+00%3A00&atl_token=XXXXX&returnUrl=http%3A%2F%2FHOST%2Fsecure%2FDashboard.jspa

2) the form is shown and you fill it

3) submit, then a redirection occur. the error is that the url is http://HOST/secure/$action.getCancelUrl() that obviously is missing

3b) the time is correctly logged

Have you any suggestion to work around this behaviour?

Tobias Reibling
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 10, 2013

Hi,

This is something we did not consider yet; looks like this can only solved by us. We will fix that with the next release (should be within the next 1-2 weeks).

Tobias

Andriy Zhdanov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 10, 2013

Hi Tobias,

Thank you for the cooperation!

0 votes
Andriy Zhdanov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 5, 2013

Hi Ariadne.

Once you know what the missing argument is, you can add it manually in code. See templates/timesheetgadget/timesheet-entry.vm, find CreateWorklog.jspa, and add a parameter to the end of the url.

Note, you can extract and update file with the following commands:

jar xf jira-timesheet-plugin.jar templates/timesheetgadget/timesheet-entry.vm
jar uf jira-timesheet-plugin.jar templates/timesheetgadget/timesheet-entry.vm

Hope it helps!

Ariadne IT13374030156 February 5, 2013

thank you for your suggestion!

now I hope that ictime people let me know which is the parameter ;)

Ariadne IT13374030156 February 5, 2013

UPDATE: I temporarly disabled the extension. I see that the problem is in timeLogged parameter.

But if I set the parameter the result is that the time is logged, non that the form is filled with defaults.

I think that the not-extended version works because the same error (on the fact that the parameter is null) is handled.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events