tefoji 3.0.0 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tefoji/jira_api.rb +6 -23
  3. data/lib/tefoji.rb +0 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 438ee8e0448c8a7805362ad3821f68f9c1ce6c50f06f4ad93aa1928d2a60516b
4
- data.tar.gz: a6dd2a6d4f52ba6145d68889671ba6b0a95d36d34d3cf2c0a2fa9f11b426972f
3
+ metadata.gz: 751842bf3544f557c135661e9d4b57531fadf07df24b7e3d4ff69784a415d948
4
+ data.tar.gz: c7c957bf732fe96d8719acdcd483ef8778b464aacd33de2ae9db589246cd7c89
5
5
  SHA512:
6
- metadata.gz: 885c76aa6b283c24412fe5114397dae1375c68acce44186d421aa3be5d9e87e59e934d6d6cdb863d0bc17434bdabd3eee50c281de0bee50297ea4e1e936d0f2b
7
- data.tar.gz: 434262e7a761ab55076bd4e53d679bd7a3f45154803d21409600456998bad4e49dd68742bf753ccb92e0b2556a7740e26c6cfea724393b3396fed4647e3aede1
6
+ metadata.gz: 1bf8f8a192b87c00ffa4856c6c72f5e7d52a490f75eb2e54b6b95707a573cbca3d323540f841cad33b5a61f59c761d31d3170a40bba4f24b0e22b4354ef286f6
7
+ data.tar.gz: bbe6db199d6bafab455ce075f6c34cd63eeb91273a1d6469f3cbbd246ef918848f3d53fc070d8eda1cbf4c745c3cf77a2905880df6dc2ebaabd24d63a2e4c239
@@ -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.0.1
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-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: debug