We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I want the following code to create the following items under user_id():
user_id()
* bigitem * item 1 * item 2 * top-level item
Here's the code:
new_folder <- item_create(title='bigitem') add_mult <- items_create( parent_id = c(new_folder$id, new_folder$id, user_id()), title = c("item 1", "item 2", "top-level item"))
What I get is three items nested under bigitem instead of bigitem and 'top-level item' being siblings:
I think this is a bug, and I think it's due to a faulty else option in this line: https://github.com/USGS-R/sbtools/blob/master/R/items_create.R#L61. Rather than the current line,
else
item <- if (length(item) == 1) rep(item[[1]]$id, length(title)) else item[[1]]$id
I suggest this:
item <- if (length(item) == 1) rep(item[[1]]$id, length(title)) else sapply(item, function(i) i$id)
followed by some testing to make sure the change actually permits multiple parents for multiple items.
The text was updated successfully, but these errors were encountered:
used in the DL curriculum, so would be good to fix
Sorry, something went wrong.
Seems reasonable to me. @lindsaycarr , you up for taking this one?
dblodgett-usgs
No branches or pull requests
I want the following code to create the following items under
user_id()
:Here's the code:
What I get is three items nested under bigitem instead of bigitem and 'top-level item' being siblings:
I think this is a bug, and I think it's due to a faulty
else
option in this line: https://github.com/USGS-R/sbtools/blob/master/R/items_create.R#L61. Rather than the current line,I suggest this:
followed by some testing to make sure the change actually permits multiple parents for multiple items.
The text was updated successfully, but these errors were encountered: