Skip to content
New issue

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

Feature: Duplicate Items #250

Closed
mateuswetah opened this issue May 21, 2019 · 6 comments

Comments

@mateuswetah
Copy link
Contributor

commented May 21, 2019

Offer items duplication on item's list.

@mateuswetah mateuswetah created this issue from a note in tainacan/tainacan (Backlog) May 21, 2019

@mateuswetah mateuswetah added the 0.11 label May 21, 2019

@mateuswetah mateuswetah self-assigned this May 21, 2019

@mateuswetah mateuswetah moved this from Backlog to To Do in tainacan/tainacan May 21, 2019

@mateuswetah mateuswetah moved this from To Do to Backlog in tainacan/tainacan May 21, 2019

@mateuswetah mateuswetah moved this from Backlog to To Do in tainacan/tainacan May 30, 2019

mateuswetah added a commit that referenced this issue May 30, 2019

Begins implementation of duplicate item logic Ref. #250. Show PDF ins…
…ide an iframe for attachments modal Ref. #252.
@mateuswetah

This comment has been minimized.

Copy link
Contributor Author

commented May 30, 2019

It seems that we might do the duplication server side via API.

@leogermani leogermani moved this from To Do to In Progress in tainacan/tainacan Jul 18, 2019

leogermani added a commit that referenced this issue Jul 18, 2019

@leogermani

This comment has been minimized.

Copy link
Contributor

commented Jul 18, 2019

Added endpoint, example:

POST -> .../collection/123/items/23/duplicate

It will return the new created item.

Just not sure how you will handle the errors. There are 2 possibles errors

  1. a complete error, will return 400 code if the item is not found, the user dont have permission, or other fatal error

  2. a partial error. Imagine there is an item with many metadata, but an error happens only in one metadata. This value is not saved but the item is created. (for example, if there is a collection_key metadata). I have this error but I'm not sure how to return it... and if it should be returned.

@mateuswetah

This comment has been minimized.

Copy link
Contributor Author

commented Jul 18, 2019

Commit 72388e shall attend most of this.

leogermani added a commit that referenced this issue Jul 18, 2019

@leogermani

This comment has been minimized.

Copy link
Contributor

commented Jul 22, 2019

Added copies and status parameters to the endpoint.

  • Copies - allows you to ask fore more copies of the item, and not just one. (default 1)
  • status - allows you to set the statuses of the new items. Note that the item must validate to have the status set. If it doesn't validate it will be kept as draft. (default draft)

The return format was changed. Now created items are returned as an array inside items index (same format as get_items)

@leogermani

This comment has been minimized.

Copy link
Contributor

commented Jul 22, 2019

Updating here that we have discussed and came up with the idea that this feature will have a behavior similar to the "bulk add items"

When you click to create copies of an item, you will be redirected to a page where you can edit the "template", once you are finish, you can choose the number of copies and then create all the items and sequence edit them. (or just go back to the list)

mateuswetah added a commit that referenced this issue Jul 31, 2019

@mateuswetah mateuswetah moved this from In Progress to Validation in tainacan/tainacan Jul 31, 2019

@leogermani

This comment has been minimized.

Copy link
Contributor

commented Aug 12, 2019

@leogermani leogermani closed this Aug 12, 2019

tainacan/tainacan automation moved this from Validation to Done Aug 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants
You can’t perform that action at this time.