[PATCH][kteam-tools] stable/create-release-tracker: change parsing of bug tasks

Steve Conklin sconklin at canonical.com
Wed Jun 1 18:41:45 UTC 2011


Applied 

On Mon, 2011-05-30 at 17:18 -0300, Herton Ronaldo Krzesinski wrote:
> Current bug_target_name in bug tasks is returning the value of the
> project's display_name property. This is breaking create-release-tracker
> parsing on main launchpad (production), because the project display name
> there contain spaces ('Kernel SRU Workflow'). Fix this by using
> display_name property of the kernel-sru-workflow project when getting
> the task names for assignment.
> 
> Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski at canonical.com>
> ---
>  stable/create-release-tracker |   12 +++++-------
>  1 files changed, 5 insertions(+), 7 deletions(-)
> 
> diff --git a/stable/create-release-tracker b/stable/create-release-tracker
> index d188573..476c29e 100755
> --- a/stable/create-release-tracker
> +++ b/stable/create-release-tracker
> @@ -226,15 +226,13 @@ class CreateTrackingBug(StdApp):
>              #
>              for t in bug.tasks:
>                  task       = t.bug_target_name
> -                parts = task.split()
> -                mastertask = parts[0]
> -                if len(parts) == 1:
> -                    if mastertask == 'kernel-sru-workflow':
> -                        t.status = "In Progress"
> +                parts = task.partition(proj.display_name)
> +                if parts[0] == '' and parts[1] == proj.display_name and parts[2] == '':
> +                    t.status = "In Progress"
>                  else:
> -                    if mastertask == 'linux':
> +                    if parts[0] != '':
>                          continue
> -                    task = parts[1]
> +                    task = parts[2].strip()
>                      if task in taskAssignments:
>                          t.assignee = self.lp.launchpad.people[taskAssignments[task]]
>                      else:
> -- 
> 1.7.4.1
> 
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20110601/ee9673ea/attachment.sig>


More information about the kernel-team mailing list