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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Popup fail with "Set Show Title in Link Fields" actived #1492

Open
1 task
JRII972 opened this issue Oct 28, 2023 · 1 comment
Open
1 task

Popup fail with "Set Show Title in Link Fields" actived #1492

JRII972 opened this issue Oct 28, 2023 · 1 comment
Labels

Comments

@JRII972
Copy link

JRII972 commented Oct 28, 2023

Issue: Bug report

Describe the bug 馃搲
Popup don't show whe title use in link field

To Reproduce 馃搩
Steps to reproduce the behavior:

  1. Set Show Title in Link Fields
  2. mousehover

Expected behavior 馃搱
Show popup with preview data

Screenshots 馃敭
If applicable, add screenshots to help explain your problem.

OS (please complete the following information): 馃寑

  • Docker - on Edge

Version Information

Can be found out by running bench version in your respective bench folder.

  • Bench Branch: 5.18.0
  • Frappe Version: version-15
  • ERPNext Version: version-15

Additional context 馃搫
On dev server

Possible Solution 馃搼

get_preview_data() {
		return frappe.xcall("frappe.desk.link_preview.get_preview_data", {
			doctype: this.doctype,
			docname: this.name,
		});
	}

It take the "docname" who in the case is the title, and not the actual docname

@JRII972 JRII972 added the bug label Oct 28, 2023
@JRII972
Copy link
Author

JRII972 commented Oct 28, 2023

i fix with that

get_preview_data() {
		return frappe.xcall("frappe.desk.link_preview.get_preview_data", {
			doctype: this.doctype,
			docname: cur_frm.doc[this.element.data('fieldname')] //replace this.name,
		});
	}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant