tefoji 3.0.0 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 438ee8e0448c8a7805362ad3821f68f9c1ce6c50f06f4ad93aa1928d2a60516b
4
- data.tar.gz: a6dd2a6d4f52ba6145d68889671ba6b0a95d36d34d3cf2c0a2fa9f11b426972f
3
+ metadata.gz: f21e85163dfc8f1b659b53e940406ad91008dad1f0f1d3244418ff67541f89a0
4
+ data.tar.gz: b8f8c785e16325f553a62b11bfe92ff5ba9164a37f6045f2468ebfb68152b569
5
5
  SHA512:
6
- metadata.gz: 885c76aa6b283c24412fe5114397dae1375c68acce44186d421aa3be5d9e87e59e934d6d6cdb863d0bc17434bdabd3eee50c281de0bee50297ea4e1e936d0f2b
7
- data.tar.gz: 434262e7a761ab55076bd4e53d679bd7a3f45154803d21409600456998bad4e49dd68742bf753ccb92e0b2556a7740e26c6cfea724393b3396fed4647e3aede1
6
+ metadata.gz: da84a77b06069df84270a4a15b3e9d2b7ad851246f25200e147443c8e14b163fb988a386ac0e117f44f3c0a896689baa40b122ad9ef12d0eeec3cee522fb2365
7
+ data.tar.gz: 98bfb1f2e0478a2598e892ed656ab5605052b22b146a637bbb18c2b0ad16c7b4b389b1a818cb0c01a157843798b5dec3e2142ef687e3991dc4ebd5dd11427b4b
@@ -99,7 +99,7 @@ module UserFunctions
99
99
  NETWORKING: 'Network Automation',
100
100
  OPERATIONS: 'Operations',
101
101
  PE: 'Dumpling',
102
- PLATFORM_OS: 'Phoenix',
102
+ PLATFORM_OS: 'Unicorn',
103
103
  PUPPETDB: 'Dumpling',
104
104
  PUPPETSERVER: 'Dumpling',
105
105
  QE: 'Quality Engineering',
@@ -331,7 +331,7 @@ module Tefoji
331
331
  end
332
332
 
333
333
  if issue_data['components']
334
- components = issue_data[:components].to_a.flatten.reject { |t| t =~ %r{^\s*$} }
334
+ components = issue_data['components'].to_a.flatten.reject { |t| t =~ %r{^\s*$} }
335
335
  unless components.empty?
336
336
  jira_fields['components'] = components.map { |component| { FIELD_NAME => component } }
337
337
  end
@@ -349,7 +349,7 @@ module Tefoji
349
349
  scrum_teams = issue_data['scrum_teams'] || issue_data['teams']
350
350
 
351
351
  if scrum_teams
352
- field_name, field_value = scrum_teams_rules(issue_data, scrum_team)
352
+ field_name, field_value = scrum_teams_rules(issue_data, scrum_teams)
353
353
  jira_fields[field_name] = field_value
354
354
  end
355
355
 
@@ -361,23 +361,17 @@ module Tefoji
361
361
  # and 'scrum_teams' field in different issues.
362
362
  #
363
363
  # For epics, put the scrum team in the 'components' field.
364
- # Except for a couple of projects, put the scrum team in customfield_11500
365
- # For Puppet Agent (PA) and Puppet Server (SERVER) projects, put the scrum team in
366
- # customfield_14200
364
+ # For ordinary issues, put the scrum team in customfield_10067
367
365
  def scrum_team_rules(issue_data, scrum_team)
368
366
  if epic?(issue_data)
369
367
  return ['components', [{ FIELD_NAME => scrum_team }]]
370
368
  end
371
369
 
372
- customfield = 'customfield_11500'
373
- if %w[PA SERVER].include?(issue_data['project'].value)
374
- customfield = 'customfield_14200'
375
- end
376
-
377
- return [customfield, { FIELD_VALUE => scrum_team }]
370
+ return ['customfield_10067', { FIELD_VALUE => scrum_team }]
378
371
  end
379
372
 
380
373
  def scrum_teams_rules(issue_data, scrum_teams)
374
+ # For epics, we can have a list of teams.
381
375
  processed_teams = scrum_teams.to_a.flatten.reject { |t| t =~ %r{^\s*$} }
382
376
  if epic?(issue_data)
383
377
  return ['components', processed_teams.map { |team| { FIELD_NAME => team } }]
@@ -403,20 +397,9 @@ module Tefoji
403
397
  end
404
398
 
405
399
  if issue_data['story_points']
406
- jira_fields['customfield_10038'] = issue_data['story_points'].to_i
407
- end
408
- if issue_data['team']
409
- jira_fields['customfield_10052'] = { FIELD_VALUE => issue_data['team'] }
410
- end
411
- if issue_data['teams']
412
- teams = issue_data['teams'].to_a.flatten.reject { |t| t =~ %r{^\s*$} }
413
- unless teams.empty?
414
- jira_fields['customfield_10066'] = teams.map { |team| { FIELD_VALUE => team } }
415
- end
416
- end
417
- if issue_data['subteam']
418
- jira_fields['customfield_10045'] = [issue_data['subteam']]
400
+ jira_fields['customfield_10058'] = issue_data['story_points'].to_i
419
401
  end
402
+
420
403
  if issue_data['sprint']
421
404
  jira_fields['customfield_10020'] = issue_data['sprint'].to_i
422
405
  end
data/lib/tefoji.rb CHANGED
@@ -808,7 +808,6 @@ module Tefoji
808
808
 
809
809
  def check_assignees(main_template_data)
810
810
  valid_users = []
811
-
812
811
  invalid_users_to_epics = {}
813
812
  main_template_data['epics']&.each do |epic|
814
813
  next unless epic['assignee']
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tefoji
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet By Perforce
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-08-17 00:00:00.000000000 Z
11
+ date: 2023-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: debug