Skip to content

Commit 717bd00

Browse files
committed
Merge branch 'staging' into production
2 parents cc77f58 + 94260a5 commit 717bd00

File tree

40 files changed

+537
-721
lines changed

40 files changed

+537
-721
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
</div>
1515

1616
<div align="center">
17-
<a href="https://travis-ci.org/DigiThinkIT/frappe">
18-
<img src="https://img.shields.io/travis/DigiThinkIT/frappe.svg?style=flat-square">
17+
<a href="https://travis-ci.com/Bloomstack/frappe">
18+
<img src="https://travis-ci.com/Bloomstack/frappe.svg?branch=develop">
1919
</a>
2020
<a href='https://frappe.io/docs'>
2121
<img src='https://img.shields.io/badge/docs-📖-7575FF.svg?style=flat-square'/>
2222
</a>
23-
<a href='https://www.codetriage.com/frappe/frappe'>
24-
<img src='https://www.codetriage.com/frappe/frappe/badges/users.svg'>
25-
</a>
23+
<a href='https://www.codetriage.com/frappe/frappe'>
24+
<img src='https://www.codetriage.com/frappe/frappe/badges/users.svg'>
25+
</a>
2626
<a href='https://coveralls.io/github/frappe/frappe?branch=develop'>
2727
<img src='https://coveralls.io/repos/github/frappe/frappe/badge.svg?branch=develop'>
2828
</a>

cypress/integration/control_link.js

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,10 @@ context('Control Link', () => {
4747
get_dialog_with_link().as('dialog');
4848

4949
cy.server();
50-
cy.route('GET', '/api/method/frappe.desk.form.utils.validate_link*').as('validate_link');
5150

5251
cy.get('.frappe-control[data-fieldname=link] input')
5352
.type('invalid value', { delay: 100 })
5453
.blur();
55-
cy.wait('@validate_link');
5654
cy.get('.frappe-control[data-fieldname=link] input').should('have.value', '');
5755
});
5856

@@ -64,10 +62,11 @@ context('Control Link', () => {
6462
cy.route('POST', '/api/method/frappe.desk.search.search_link').as('search_link');
6563

6664
cy.get('@todos').then(todos => {
67-
cy.get('.frappe-control[data-fieldname=link] input').as('input');
68-
cy.get('@input').focus();
65+
cy.get('.frappe-control[data-fieldname=link] input').focus().as('input');
6966
cy.wait('@search_link');
70-
cy.get('@input').type(todos[0]).blur();
67+
cy.get('@input').type(todos[0]);
68+
cy.get('.frappe-control[data-fieldname=link] ul').should('be.visible');
69+
cy.get('.frappe-control[data-fieldname=link] input').type('{enter}', { delay: 100 });
7170
cy.wait('@validate_link');
7271
cy.get('@input').focus();
7372
cy.get('.frappe-control[data-fieldname=link] .link-btn')
@@ -76,4 +75,35 @@ context('Control Link', () => {
7675
cy.location('hash').should('eq', `#Form/ToDo/${todos[0]}`);
7776
});
7877
});
78+
79+
it('show title field in link', () => {
80+
get_dialog_with_link().as('dialog');
81+
82+
cy.server();
83+
cy.insert_doc("Property Setter", {
84+
property: "show_title_field_in_link",
85+
doc_type: "ToDo",
86+
value: 1,
87+
doctype_or_field: "DocType"
88+
}, true);
89+
cy.route('POST', '/api/method/frappe.desk.search.search_link').as('search_link');
90+
91+
cy.get('.frappe-control[data-fieldname=link] input').focus().as('input');
92+
cy.wait('@search_link');
93+
cy.get('@input').type('todo for link');
94+
cy.wait('@search_link');
95+
cy.get('.frappe-control[data-fieldname=link] ul').should('be.visible');
96+
cy.get('.frappe-control[data-fieldname=link] input').type('{enter}', { delay: 100 });
97+
cy.get('.frappe-control[data-fieldname=link] input').blur();
98+
cy.get('@dialog').then(dialog => {
99+
cy.get('@todos').then(todos => {
100+
let field = dialog.get_field('link');
101+
let value = field.get_value();
102+
let label = field.get_label_value();
103+
104+
expect(value).to.eq(todos[0]);
105+
expect(label).to.eq('this is a test todo for link');
106+
});
107+
});
108+
});
79109
});

frappe/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
sys.setdefaultencoding("utf-8")
2525

2626
__frappe_version__ = '12.8.1'
27-
__version__ = '2.0.6'
27+
__version__ = '2.0.7'
2828
__title__ = "Frappe Framework"
2929

3030
local = Local()

frappe/automation/doctype/auto_repeat/auto_repeat.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@
188188
"label": "Repeat on Last Day of the Month"
189189
}
190190
],
191-
"modified": "2019-07-17 11:30:51.412317",
191+
"modified": "2020-12-31 00:50:50.740293",
192192
"modified_by": "Administrator",
193193
"module": "Automation",
194194
"name": "Auto Repeat",
@@ -231,7 +231,6 @@
231231
"write": 1
232232
}
233233
],
234-
"search_fields": "reference_document",
235234
"sort_field": "modified",
236235
"sort_order": "DESC",
237236
"title_field": "reference_document",

frappe/boot.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ def get_bootinfo():
8282
bootinfo.points = get_energy_points(frappe.session.user)
8383
bootinfo.frequently_visited_links = frequently_visited_links()
8484
bootinfo.link_preview_doctypes = get_link_preview_doctypes()
85+
bootinfo.doctypes_with_show_link_field_title = doctypes_with_show_link_field_title()
8586

8687
return bootinfo
8788

@@ -266,4 +267,10 @@ def get_success_action():
266267
return frappe.get_all("Success Action", fields=["*"])
267268

268269
def get_link_preview_doctypes():
269-
return [d.name for d in frappe.db.get_all('DocType', {'show_preview_popup': 1})]
270+
return [d.name for d in frappe.db.get_all('DocType', {'show_preview_popup': 1})]
271+
272+
def doctypes_with_show_link_field_title():
273+
dts = frappe.get_all("DocType", {"show_title_field_in_link": 1})
274+
custom_dts = frappe.get_all("Property Setter", {"field_name": "show_title_field_in_link", "value": 1})
275+
276+
return [d.name for d in dts + custom_dts if d]

frappe/chat/doctype/chat_message/chat_message.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"label": "URLs"
6363
}
6464
],
65-
"modified": "2019-11-07 13:21:19.395927",
65+
"modified": "2020-12-31 00:50:42.122683",
6666
"modified_by": "Administrator",
6767
"module": "Chat",
6868
"name": "Chat Message",
@@ -82,7 +82,7 @@
8282
}
8383
],
8484
"quick_entry": 1,
85-
"search_fields": "content, user",
85+
"search_fields": "user",
8686
"sort_field": "modified",
8787
"sort_order": "DESC",
8888
"title_field": "content",

frappe/chat/doctype/chat_room/chat_room.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
}
7272
],
7373
"image_field": "avatar",
74-
"modified": "2019-11-07 13:20:24.625329",
74+
"modified": "2020-12-31 00:50:42.734785",
7575
"modified_by": "Administrator",
7676
"module": "Chat",
7777
"name": "Chat Room",
@@ -91,7 +91,6 @@
9191
"write": 1
9292
}
9393
],
94-
"search_fields": "room_name",
9594
"show_name_in_global_search": 1,
9695
"sort_field": "modified",
9796
"sort_order": "DESC",

0 commit comments

Comments
 (0)