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: 52367
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: new feature request, add support to append to the field
Date: Wed, 2 Dec 2009 09:16:02 -0800
To: "bug-JIRA-Client [...] rt.cpan.org" <bug-JIRA-Client [...] rt.cpan.org>
From: "Andrey Belous" <abelous [...] broadcom.com>
Hi,Gustavo Is it possible to add new function that will append changes to existing field . It can be a separate function or additional switch to update_issue. It is useful to have possibility to add text to some of the field. For example: in some cases we would like to add text to "Description" or "How-To-Repeat" field Thank,you Andrey
Hi, Andrey. I'm not sure this functionality is general enough to merit its own method. For instance, to append a line to the description of an issue you can do this: my $issue = $jira->getIssue('TST-1'); $issue = $jira->update_issue($issue, {description => "$issue->{description}\nAppended line.\n"}); Isn't it simple enough? BTW, I just released version 0.23 of JIRA::Client with a few improvements.
Subject: RE: [rt.cpan.org #52367] new feature request, add support to append to the field
Date: Sat, 12 Dec 2009 17:39:13 -0800
To: "'bug-JIRA-Client [...] rt.cpan.org'" <bug-JIRA-Client [...] rt.cpan.org>
From: "Andrey Belous" <abelous [...] broadcom.com>
Hi, Gustavo We just switched to JIRA and it is different from what we used before. This is maybe why I am not familiar with how jira is working. My original problem was with custom field. In order to add to custom filed I need to get original value first. my $issue = $jira->getIssue('TST-1'); my @custom_fields = $jira->get_issue_custom_field_values($issue,"customfield_10007"); Append string And run update issue or progress_workflow_action_safely depends on other variables As I said it is just different tool. I will try new verison next week. Thank,you Andrey Show quoted text
-----Original Message----- From: Gustavo Leite de Mendonça Chaves via RT [mailto:bug-JIRA-Client@rt.cpan.org] Sent: Saturday, December 12, 2009 3:25 PM To: Andrey Belous Subject: [rt.cpan.org #52367] new feature request, add support to append to the field <URL: https://rt.cpan.org/Ticket/Display.html?id=52367 > Hi, Andrey. I'm not sure this functionality is general enough to merit its own method. For instance, to append a line to the description of an issue you can do this: my $issue = $jira->getIssue('TST-1'); $issue = $jira->update_issue($issue, {description => "$issue->{description}\nAppended line.\n"}); Isn't it simple enough? BTW, I just released version 0.23 of JIRA::Client with a few improvements.
Subject: Re: [rt.cpan.org #52367] new feature request, add support to append to the field
Date: Sun, 13 Dec 2009 00:01:37 -0200
To: bug-JIRA-Client [...] rt.cpan.org
From: Gustavo Leite de Mendonça Chaves <gnustavo [...] cpan.org>
On Sat, Dec 12, 2009 at 11:39 PM, Andrey Belous via RT <bug-JIRA-Client@rt.cpan.org> wrote: Show quoted text
>       Queue: JIRA-Client >  Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=52367 > > > Hi, Gustavo > We just switched to JIRA and it is different from what we used before. This is maybe why I am not familiar with how jira is working. > My original problem was with custom field. In order to add to custom filed I need to get original value first. > > my $issue = $jira->getIssue('TST-1'); > my @custom_fields = $jira->get_issue_custom_field_values($issue,"customfield_10007"); > > Append string > And run update issue or progress_workflow_action_safely depends on other variables
Ah. Custom fields are a little more involved because of the way they are represented inside a RemoteIssue object. Supposing you want to append a line to a custom field called 'How to Repeat', you could do this: my $issue = $jira->getIssue('TST-1'); my ($how_to_repeat) = $jira->get_issue_custom_field_values($issue, 'How to Repeat'); $issue = $jira->update_issue($issue, {custom_fields => {'How to Repeat' => "$how_to_repeat\nNew line.\n"}}); Note that you can refer to it by name ('How to Repeat'), if you connect to JIRA with a user with administrative privileges. Otherwise, you need to use the field's id explicitly. Gustavo.
Subject: RE: [rt.cpan.org #52367] new feature request, add support to append to the field
Date: Sat, 12 Dec 2009 18:11:44 -0800
To: "'bug-JIRA-Client [...] rt.cpan.org'" <bug-JIRA-Client [...] rt.cpan.org>
From: "Andrey Belous" <abelous [...] broadcom.com>
Hi,Gustavo Thank you for your replay I already discovered that when using getCustomFields I need special privileges. According to the following link this should be fixed in new JIRA version. http://jira.atlassian.com/browse/JRA-6857?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel I am stuck with JIRA 3.13.2 and our IT does not have any plans to go to new version Thank, you Andrey Show quoted text
-----Original Message----- From: Gustavo Leite de Mendonça Chaves via RT [mailto:bug-JIRA-Client@rt.cpan.org] Sent: Saturday, December 12, 2009 9:02 PM To: Andrey Belous Subject: Re: [rt.cpan.org #52367] new feature request, add support to append to the field <URL: https://rt.cpan.org/Ticket/Display.html?id=52367 > On Sat, Dec 12, 2009 at 11:39 PM, Andrey Belous via RT <bug-JIRA-Client@rt.cpan.org> wrote:
>       Queue: JIRA-Client >  Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=52367 > > > Hi, Gustavo > We just switched to JIRA and it is different from what we used before. This is maybe why I am not familiar with how jira is working. > My original problem was with custom field. In order to add to custom filed I need to get original value first. > > my $issue = $jira->getIssue('TST-1'); > my @custom_fields = $jira->get_issue_custom_field_values($issue,"customfield_10007"); > > Append string > And run update issue or progress_workflow_action_safely depends on other variables
Ah. Custom fields are a little more involved because of the way they are represented inside a RemoteIssue object. Supposing you want to append a line to a custom field called 'How to Repeat', you could do this: my $issue = $jira->getIssue('TST-1'); my ($how_to_repeat) = $jira->get_issue_custom_field_values($issue, 'How to Repeat'); $issue = $jira->update_issue($issue, {custom_fields => {'How to Repeat' => "$how_to_repeat\nNew line.\n"}}); Note that you can refer to it by name ('How to Repeat'), if you connect to JIRA with a user with administrative privileges. Otherwise, you need to use the field's id explicitly. Gustavo.