Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the JIRA-Client CPAN distribution.

Report information
The Basics
Id: 51675
Status: resolved
Priority: 0/
Queue: JIRA-Client

People
Owner: GNUSTAVO [...] cpan.org
Requestors: abelous [...] broadcom.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: progress_workflow_action_safely fail when dudate field defined
Date: Wed, 18 Nov 2009 14:05:01 -0800
To: "bug-JIRA-Client [...] rt.cpan.org" <bug-JIRA-Client [...] rt.cpan.org>
From: "Andrey Belous" <abelous [...] broadcom.com>
JIra Version: 3.13.2-#335 dosent like progress_workflow_action_safely when dudate field is set This is what i can get from debuger: main::(jira_work.pl:44): $jira->progress_workflow_action_safely("${PREFIX}${issue_num}",'Resolve Issue', { issuetype=>"$issue->{'type'}",customfield_10007=> $string}); DB<1> p $issue->{duedate} 2009-11-19T08:00:00.000Z DB<2> n soapenv:Server.userException, com.atlassian.jira.rpc.exception.RemoteValidationException: Fields not valid for workflow action Resolve Issue: Errors: {duedate=You did not enter a valid date. Please enter the date in the format "d/MMM/yy", eg. "18/Nov/09"} Error Messages: [] at /projects/stbdev/bdvd/bin/.plib/cpan/JIRA/Client.pm line 898 JIRA::Client::AUTOLOAD('JIRA::Client=HASH(0x1387830)', 'SWBLURAY-17742', 1001, 'HASH(0x20a9f10)') called at /projects/stbdev/bdvd/bin/.plib/cpan/JIRA/Client.pm line 667 JIRA::Client::progress_workflow_action_safely('JIRA::Client=HASH(0x1387830)', 'SWBLURAY-17742', 'Resolve Issue', 'HASH(0x20a9f10)') called at jira_work.pl line 44 Debugged program terminated. Use q to quit or R to restart, use o inhibit_exit to avoid stopping after program termination,
I make changes to my code before calling progress_workflow_action_safely. I don't know if it is common issue or only wrong setup on our JIRA server. Changes are: if ( $issue->{duedate} ) { my $yy = substr($issue->{duedate},2,2); my $mm = substr($issue->{duedate},5,2); my $dd = substr($issue->{duedate},8,2); my $M = [qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec)]->[$mm-1]; $jira->progress_workflow_action_safely("${PREFIX}${issue_num}",'Resolve Issue', { issuetype=>"$issue->{'type'}",customfield_10007=>$string,duedate=>"${dd}/${M}/${yy}",}); } else { $jira->progress_workflow_action_safely("${PREFIX}${issue_num}",'Resolve Issue', { issuetype=>"$issue->{'type'}",customfield_10007=>$string,}); }
Hi, Andrey. As you noticed, the problem is that JIRA returns the duedate field in the ISO standard format but requires a different format when you want to set it in the createIssue and the progressWorkflowAction methods. I added a new field conversion to the create_issue and the progress_workflow_action_safely methods so that you shouldn't need to pay attention to this anymore. This is incorporated in the 0.20 version which I just uploaded to CPAN. You can get it from http://code.google.com/p/jira-client/ if it's not appearing on CPAN yet. Please, check if it works for you. Thanks for the hint. Gustavo.