Skip to content

Commit

Permalink
fix empty user
Browse files Browse the repository at this point in the history
  • Loading branch information
HLAD Nicolas committed Sep 6, 2024
1 parent 64e2534 commit 3ff9b38
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/JiraPharoAPI/JiraPharoImporter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,10 @@ JiraPharoImporter >> extractUserFromAccountID: accountId [
{ #category : #'api - import' }
JiraPharoImporter >> importAllCurrentAndPastIssuesOf: anEmail [

| user modelUser issues |
user := self api findUserUsingQuery: anEmail.
modelUser := self importUserFromAccountID: user first accountId.
| possibleUsers modelUser issues |
possibleUsers := self api findUserUsingQuery: anEmail.
possibleUsers ifEmpty: [ ^ { } ].
modelUser := self importUserFromAccountID: possibleUsers first accountId.
issues := self importAllIssuesFromQuery:
'assignee was ' , modelUser accountId.
issues do: [ :iss | iss addHistoricallyAssigned: modelUser ].
Expand Down

0 comments on commit 3ff9b38

Please sign in to comment.