Possible bug : copy-paste list items in GDoc doesn't generate new listIDs

26 views
Skip to first unread message

Mihai Petcu

unread,
Mar 20, 2019, 8:59:52 AM3/20/19
to Google Apps Script Community
Dear all,

I am raising this issue related to a GDocs add-on I wrote that gets lists/list items in the document. Long story short when a user copy-pastes a list item anywhere in the document, the listID gets copied as well.

This scenario isn't that corner case because a user can copy-paste existing list items when similar lists are needed in the same document. The list item text can change slightly, but the listID would still point to the origin list.

Now, this is a hassle for me because I use listIDs to parse and group items in lists and AFAIK there are no other unique identifiers for list items. 

Is there something I missed in the documentation? 
Can someone please help clarify if this is a bug, and if not, what is the recommended approach to handle this scenario?

Thanks in advance,
Mihai Petcu

Eric Koleda

unread,
Mar 20, 2019, 9:42:55 AM3/20/19
to google-apps-sc...@googlegroups.com
Hi Mihai,

This may not be expected behavior, but it isn't a bug in Apps Script. If you change the bullets of your original list in the Google Docs UI, you'll notice the bullets change on the copied list items as well. By design, Google Docs keeps list items linked when you copy and paste them.

- Eric

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-script-community.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/47ac1c9e-4ae2-4dc6-9199-2c6a4c793a02%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mihai Petcu

unread,
Mar 23, 2019, 6:30:20 AM3/23/19
to Google Apps Script Community
Thank you for the answer, Eric.

Regards,
Mihai
Reply all
Reply to author
Forward
0 new messages