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

Original Source field shows broken links #2642

Closed
M0nk3yy opened this issue Nov 23, 2023 · 8 comments
Closed

Original Source field shows broken links #2642

M0nk3yy opened this issue Nov 23, 2023 · 8 comments
Assignees
Labels
bug Functionality which is not working as intended
Milestone

Comments

@M0nk3yy
Copy link
Contributor

M0nk3yy commented Nov 23, 2023

If I want to make a new feature and decide to do so by cloning a tangetially similar feature, I am left with a permanent reminder of which item was cloned in terms of the "Original Source" field:

image

It is quite hidden away, so is not a big deal, but I do think that I should have control over this. Currently it cannot be deleted or edited in any way.

The other common scenario I am facing is this:

image

where "undefined" links populate the field. Again, I cannot manually add a new source, or remove the broken link. In the case of this particular example, it is because I imported this actor between Foundry instances and the source is not available in the new world.

I would suggest that the most ideal solution would be formatting this section as in Advancements, so they can be deleted or new sources added via drag and drop.

image

In the meantime, I am removing the links via macro (thank you @krbz999).

(await fromUuid("<uuid goes here>")).unsetFlag("core", "sourceId");

@Fyorl
Copy link
Contributor

Fyorl commented Nov 28, 2023

The core.sourceId flag is API-only and not intended to be user editable. We also don't expect that the average user will be editing the source information for their Items, it's primarily intended for content providers. We should fix the display of broken links, but other than that I don't anticipate we would make additional changes here just yet.

@Fyorl Fyorl changed the title Ability to delete/edit "Original Source" field Original Source field shows broken links Nov 28, 2023
@Fyorl Fyorl added the bug Functionality which is not working as intended label Nov 28, 2023
@Fyorl Fyorl added this to the D&D5E 2.4.1 milestone Nov 28, 2023
@Fyorl Fyorl self-assigned this Nov 28, 2023
@Fyorl Fyorl closed this as completed Nov 28, 2023
@M0nk3yy
Copy link
Contributor Author

M0nk3yy commented Nov 28, 2023

So if an item is cloned, it is considered intentional that the source shows the original item and it cannot be altered?

@Fyorl
Copy link
Contributor

Fyorl commented Nov 28, 2023

The sourceId flag has always been managed by the core software and simply putting it on display somewhere in the UI in a game system hasn't changed that.

It's unclear what you mean by 'cloned', but Document#clone does not set the sourceId flag, and therefore by extension duplicating an Item via the context menu command also does not set the sourceId flag. It's set under a few different circumstances (I may have missed some):

  1. Importing an Item from a compendium.
  2. Copying, cloning, or otherwise duplicating an Item that already had a sourceId flag will inherit the same sourceId as the original Item.
  3. Dropping an Item from the sidebar onto a sheet will set a sourceId provided the original Item did not already have a sourceId, otherwise it will behave per (2).

@krbz999
Copy link
Contributor

krbz999 commented Nov 28, 2023

  1. Dragging an item but dropping it in the same location (this sets it locally and vanishes upon refresh).

@M0nk3yy
Copy link
Contributor Author

M0nk3yy commented Nov 28, 2023

Yeah, probably improper terminology on my part. The SRD items (at least once imported) appear to have their own item name set as the source (whereas freshly created items are entirely blank). Upon duplicating the item (right-click, duplicate), the original item is then permanently recorded as the source.

Having this reminder permanently embedded with no way to change it doesn't seem proper in my opinion.

@Fyorl
Copy link
Contributor

Fyorl commented Nov 28, 2023

You are perhaps misunderstanding what is going on.

The SRD items (at least once imported) appear to have their own item name set as the source

They will appear to have the same name since the imported Item is a copy of the Item in the compendium, but the Item you see displayed in the 'Original Source' field is a link back to the original Item that exists inside the compendium. This is important.

whereas freshly created items are entirely blank

Which should make sense, yes? Because if an Item was created from scratch it has no source.

Upon duplicating the item (right-click, duplicate), the original item is then permanently recorded as the source.

This seems to imply that the act of duplicating the Item is what causes the source to be 'permanently recorded', but this is not the case. The Item that is being duplicated already had a sourceId set, and duplicating that Item also copies its sourceId. Both Items will point back to the original Item inside the compendium. It has only become 'permanently recorded' in the same way that the Item's type is also 'permanently recorded' once duplicated. That also cannot be changed (via the UI).

@krbz999
Copy link
Contributor

krbz999 commented Nov 28, 2023

I don't think there's a misunderstanding here, but rather a request, i.e.: "I want to make a new feature and decide to do so by cloning a tangetially similar feature," and thus Chronurgy has 'School of Evocation' as its source. Which seems quite useless, perhaps even misleading.

@Fyorl
Copy link
Contributor

Fyorl commented Nov 28, 2023

I understand the request, but I already answered it here. There are no plans to allow the sourceId flag to be user-editable at this time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Functionality which is not working as intended
Projects
None yet
Development

No branches or pull requests

3 participants