Skip to content

Commit

Permalink
Merge pull request #12 from Ssunoo2/275-Add-refresh-capability-to-jir…
Browse files Browse the repository at this point in the history
…a-downloader

275- deleted extraneous function
  • Loading branch information
Ssunoo2 authored Feb 20, 2024
2 parents b23edf9 + 1b45fa2 commit 1463e5a
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions vignettes/fetch_and_save_jira_issues.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -48,28 +48,6 @@ username <- scan("~/atlassian_username",what="character",quiet=TRUE)
```

# function that gets the most recent "created" field of the issues downloaded in you path. This value is used to download only issues created after this date
```{r eval=FALSE}
find_most_recent_issue_date <- function(save_path) {
files <- list.files(save_path, pattern = "\\.json$", full.names = TRUE)
most_recent_date <- as.POSIXct("1970-01-01", tz="") # Initialize with a very old date, no timeszone
for (file in files) {
message("Scanning file: ", basename(file))
issue <- jsonlite::read_json(file, simplifyVector = FALSE)
created_date <- as.POSIXct(issue$created, format="%Y/%m/%d %H:%M", tz="")
if (created_date > most_recent_date) {
most_recent_date <- created_date
}
}
return(most_recent_date)
}
print(find_most_recent_issue_date(save_path_issue_tracker_issues))
```

# Download Issue with Comments

In the same manner as before, we can perform the same function call, but including the field `comment`. This will result in the same table being generated but with the additional comment information per issue (if an issue has more than one comment, the issue id is repeated for each different comment). The comment is shown on the column `comment_comments_id`.
Expand Down

0 comments on commit 1463e5a

Please sign in to comment.