Giter Site home page Giter Site logo

matbmeijer / jiragiler Goto Github PK

View Code? Open in Web Editor NEW
31.0 5.0 13.0 615 KB

User-friendly :small_blue_diamond:JIRA API wrapper. Track projects & issues from within R

Home Page: https://matbmeijer.github.io/JirAgileR/

License: Other

R 100.00%
jira r agile api wrapper atlassian project-management

jiragiler's Issues

Historic data

Would it be possible to use the expand = changelog functionality in the API to get field history? It's useful to understand when things like due dates change over time, but currently I can only get the data as it exists today for the issues.

Error fetching resolutiondate

When i append "resolutiondate" to searchfields to fetch from Jira i get an error.

GetJiraData <- function() {
  searchFields <- c("project", "key", "status", "resolution", "created", "resolutiondate", "timeoriginalestimate", "timeestimate", "timespent")
#... Plus the other required fields
  jiraIssues <- JiraQuery2R(domain = domain, query=jqlQuery, fields = searchFields, user = username, password = password, maxResults = 10000)
}
issues <- GetJiraData()

returns

 Error in data.table::rbindlist(ext_info, fill = T) : 
  Class attribute on column 6 of item 3 does not match with column 6 of item 1. 

I am using RStudio Version 1.2.1578 on Windows 10.

Using API Key for private projects?

I'd like to use this package to get data from our work account. I have an api key that works great with the httr package - don't see a place for that in the functions here.

Error: Error Code 403 - Client error: (403) Forbidden

Hi. I 'm just trying your example, only changing your domain by mine and other domain that I also have accesss, and the result is always the same : "Error: Error Code 403 - Client error: (403) Forbidden". Do I have to set up something in the atlassian account?

library(JirAgileR, quietly = T)
library(knitr, quietly = T)
library(dplyr, quietly = T)

Save credentials to pass them only one time

save_jira_credentials(domain = "xxxxx" ,
username="xxxxx",
password = "xxxxx",
)

Get full list of projects in domain

get_jira_projects() %>%
select(key, name) %>%
kable(row.names = F, padding = 0)

Error encountered in get_jira_dashboards()

Hi, I encountered tyhe following error.

get_jira_dashboards()

generates the error

Error in rbind(deparse.level, ...) : 
  numbers of columns of arguments do not match

Troubleshooting, I found the offending line in the code here:
Error Line using rbind

When I changed

  df <- do.call(rbind, issue_list)

to

  df <- dplyr::bind_rows(issue_list)

it works.
However need to include import of dplyr package

Column names and values do not match when "comment" field is used and as.data.frame = TRUE

It seems using the default parameter as.data.frame = TRUE causes column names do not match values, nor the function get_jira_issues to respect the fields chosen by the user (parameter fields=) when the comment field is used. However, turning the parameter to as.data.frame = FALSE, which returns the json, properly return the data.

I got this issue with the example from the README.md.

Adding customfields

Hello,

I have used my own un-published solutions for Jira in R for years and I'm happy to finally see a clean public library for it.

One major hurdle are of course the custom fields. I am ready to help and wanted to throw a few potential solutions:

  • Adding an option to expose the entire raw JSON object to let the user pick the fields. From memory this is what the python module does.

  • Being able to locally define supported fields

  • Flattening the JSON object as much as possible to return everything in a data.frame. I seem to remember {jsonlite} or {httr} has solid options.

  • Using the /field API and store the result locally. This could allow JjirAgileR learn about the structure of the Jira instance.
    I would need to test it further but it seems to describe which field is a date, an array etc. A different endpoint also returns the possible value of a field. This can be used to build the levels of a factor.

Minor documentation suggestions re: resolutiondate and get_jira_projects()

Mostly just here to say thanks for a super useful package! This gives me/my team a lot more flexibility and saves us time not having to futz around with Jira's clunky default reporting/UI.

I could mostly follow along with the extant docs, but tangoed with a few things that might be worth mentioning more explicitly (or help other newcomers):

  1. In get_jira_projects(), it says "Calling the function too many times might block your access and you will have to access manually online and enter a CAPTCHA at jira.yourdomain.com/secure/Dashboard.jspa", which I assume was the reason for the 403 Forbidden errors I hit. In my case, there was no CAPTCHA, but signing out of Jira and signing back in in my browser session seemed to work (gleaned from https://community.atlassian.com/t5/Answers-Developer-Questions/How-long-does-the-captcha-last-when-triggered-with-the-rest-API/qaq-p/546974).

  2. The classes for the date fields created, updated, and resolutiondate from get_jira_issues() are POSIXct, POSIXct, and numeric, respectively. I converted resolutiondate via as.POSIXct(resolutiondate, origin = "1970-01-01 00:00.00 UTC") which seemed to produce reasonable results for my date math, but I'm not sure how to be sure (is there a definitive source for Jira's origin?)

R version 3.6.2 (2019-12-12)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 15063)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] DT_0.12           JirAgileR_0.0.1.3 kableExtra_1.1.0  dplyr_0.8.4      

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.3        pillar_1.4.3      compiler_3.6.2    tools_3.6.2       digest_0.6.23     jsonlite_1.6.1   
 [7] evaluate_0.14     tibble_2.1.3      lifecycle_0.1.0   viridisLite_0.3.0 pkgconfig_2.0.3   rlang_0.4.4      
[13] rstudioapi_0.10   curl_4.3          xfun_0.12         httr_1.4.1        stringr_1.4.0     knitr_1.28       
[19] xml2_1.2.2        vctrs_0.2.2       htmlwidgets_1.5.1 hms_0.5.3         webshot_0.5.2     tidyselect_1.0.0 
[25] glue_1.3.1        R6_2.4.1          rmarkdown_2.1     readr_1.3.1       purrr_0.3.3       magrittr_1.5     
[31] scales_1.1.0      htmltools_0.4.0   assertthat_0.2.1  rvest_0.3.5       colorspace_1.4-1  stringi_1.4.5    
[37] munsell_0.5.0     crayon_1.3.4     

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.