wshanks / Zutilo

Zotero plugin providing some additional editing features
Other
1.53k stars 72 forks source link

Add batch editing of item types #166

Closed qqobb closed 3 years ago

qqobb commented 4 years ago

Closes #162

wshanks commented 4 years ago

It is nice how small of a code change this is, but I think it might hide the feature too much. What about making a new "Paste item type" function that just pastes the item type? I think this would not require much more code.

qqobb commented 4 years ago

Ok, I agree that a separate "Paste item type" function might be clearer. One advantage would be that one doesn't have to edit the JSON for changing item types.

I added a commit for the new function. This is not tested. Let me know if you want me to squash or force-push. (I would need to check how to do this.)

qqobb commented 4 years ago

There was an issue with the original version of the "Paste item type" function. I added a fix and it's working now. Sorry about that.

wshanks commented 4 years ago

No problem -- I actually was looking at the old version right when you pushed and saw the refresh button appear on the page. This version looks good to me.

I can take care of cleaning up the commits. The way I usually do it is git rebase -i master with the branch checked out and then change pick to squash for every commit after the first one. GitHub also has an option to do this automatically but I haven't tried it.

qqobb commented 3 years ago

It would be nice if you could take care of cleaning up the commits. (Are you doing git push origin +master after squashing?)

I guess you might want to include these changes:

You could also consider changing the name of the "Copy item fields" function. Maybe "Copy item type and fields" is more fitting now.

wshanks commented 3 years ago

I cleaned up the commits and took care of the locales.

qqobb commented 3 years ago

Thanks! Updating to version 3.6.0 went well.

floriandierickx commented 3 years ago

Wonderful, thanks a lot for this feature @qqobb and @wshanks ! I just tried it out and it works like a charm, you just made me gain hours and hours of batch editing time :))))