#13044 closed defect (fixed)
Clone button is missing if the description is empty
Reported by: | Jun Omae | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Milestone: | 1.3.4 |
Component: | ticket system | Version: | |
Severity: | minor | Keywords: | ticketclone |
Cc: | Branch: | ||
Release Notes: |
Fix ticket clone button missing when ticket description empty. |
||
API Changes: |
CoffeeScript 1.x should be used for compiling. The Makefile returns an error if CoffeeScript version is not 1.x. |
||
Internal Changes: |
Description
Attachments (0)
Change History (13)
comment:1 by , 6 years ago
Keywords: | ticketclone added |
---|---|
Milestone: | next-dev-1.3.x → 1.3.4 |
Owner: | set to |
Release Notes: | modified (diff) |
Status: | new → assigned |
comment:2 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Committed to trunk in r16766.
follow-up: 5 comment:4 by , 6 years ago
There are some missing messages following r16765:
-
trac/locale/messages-js.pot
diff --git a/trac/locale/messages-js.pot b/trac/locale/messages-js.pot index 88b6a8ec9..986b69e9f 100644
a b msgid "" 8 8 msgstr "" 9 9 "Project-Id-Version: Trac 1.3.4\n" 10 10 "Report-Msgid-Bugs-To: trac-dev@googlegroups.com\n" 11 "POT-Creation-Date: 2018-07- 19 16:31-0700\n"11 "POT-Creation-Date: 2018-07-29 11:30-0700\n" 12 12 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 13 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 14 14 "Language-Team: LANGUAGE <LL@li.org>\n" … … msgstr "" 17 17 "Content-Transfer-Encoding: 8bit\n" 18 18 "Generated-By: Babel 2.6.0\n" 19 19 20 #: tracopt/ticket/htdocs/ticketclone.js:22 21 msgid "Clone" 22 msgstr "" 23 24 #: tracopt/ticket/htdocs/ticketclone.js:34 20 #: tracopt/ticket/htdocs/ticketclone.js:61 25 21 msgid "Create a new ticket from this comment" 26 22 msgstr "" 27 23 28 #: tracopt/ticket/htdocs/ticketclone.js: 4124 #: tracopt/ticket/htdocs/ticketclone.js:70 29 25 #, python-format 30 26 msgid "(part of #%(ticketid)s) %(summary)s" 31 27 msgstr "" 32 28 33 #: tracopt/ticket/htdocs/ticketclone.js: 4729 #: tracopt/ticket/htdocs/ticketclone.js:76 34 30 #, python-format 35 31 msgid "" 36 32 "Copied from [%(source)s]:\n" 37 33 "%(description)s" 38 34 msgstr "" 39 35 40 #: tracopt/ticket/htdocs/ticketclone.js: 5936 #: tracopt/ticket/htdocs/ticketclone.js:89 41 37 msgid "Create a copy of this ticket" 42 38 msgstr "" 43 39 44 #: tracopt/ticket/htdocs/ticketclone.js: 6040 #: tracopt/ticket/htdocs/ticketclone.js:90 45 41 #, python-format 46 42 msgid "%(summary)s (cloned)" 47 43 msgstr "" 48 44 49 #: tracopt/ticket/htdocs/ticketclone.js: 6545 #: tracopt/ticket/htdocs/ticketclone.js:95 50 46 #, python-format 51 47 msgid "" 52 48 "Cloned from #%(id)s:\n" 53 49 "%(description)s" 54 50 msgstr "" 55 51 56 #: tracopt/ticket/htdocs/ticketdeleter.js:1657 #: tracopt/ticket/htdocs/ticketdeleter.js:2258 msgid "Delete"59 msgstr ""60 61 #: tracopt/ticket/htdocs/ticketdeleter.js:1662 msgid "Delete ticket"63 msgstr ""64 65 #: tracopt/ticket/htdocs/ticketdeleter.js:2266 #, python-format67 msgid "Delete comment %(num)s"68 msgstr ""69 70 52 #: trac/admin/templates/admin_perms.html:10 71 53 msgid "Toggle all" 72 54 msgstr ""
Looks like it might be associated with template literals.
comment:5 by , 6 years ago
Replying to Ryan J Ollos:
Looks like it might be associated with template literals.
There's an open issue for supporting template literals: https://github.com/python-babel/babel/issues/329
comment:6 by , 6 years ago
Reverting to coffeescript 1.12.7 resolves the issue. That's the only workaround that I know of.
follow-up: 8 comment:7 by , 6 years ago
According to browser compatibility of template literals, Internet Explorer 11 doesn't support the template literals. I don't think we should use template literals. … Or, we have dropped support of IE 11 for trunk?
comment:8 by , 6 years ago
Replying to Jun Omae:
Or, we have dropped support of IE 11 for trunk?
I don't know that we've discussed or made any decision.
I don't care whether we use template literals or not, the issue is that CoffeeScript chooses to use them. Unless a configuration option for CoffeeScript can be found that avoids using them, we will need to continue using Coffee script 1.x to avoid template literals.
comment:9 by , 6 years ago
If we stick with CoffeeScript 1.x, maybe we could parse the version in the Makefile and throw an error if the major version is not 1:
$ coffee -version
CoffeeScript version 1.12.7
comment:10 by , 6 years ago
In r16790, committed update of compiled CoffeeScript.
Proposed update to Makefile:
-
Makefile
diff --git a/Makefile b/Makefile index 27b2f7a94..5aa5c8036 100644
a b jinja: 365 365 $(PYTHON) contrib/jinjachecker.py $(jinjaopts) $(templates) 366 366 367 367 coffeescripts ?= $(shell find trac tracopt -name \*.coffee) 368 coffee_version ?= $(shell coffee -v | sed -E s"|CoffeeScript version ([0-9]+)\.[0-9]+\.[0-9]+|\1|")368 coffee_version ?= $(shell coffee -v 2> /dev/null | sed -E s"|CoffeeScript version ([0-9]+)\.[0-9]+\.[0-9]+|\1|") 369 369 370 370 coffee: 371 371 ifneq "$(coffee_version)" "1"
Tested with:
- Ubuntu 16.04.1 LTS
- OSX 10.13.6
comment:13 by , 6 years ago
API Changes: | modified (diff) |
---|
We could change the jQuery selector to also match the br element.
Proposed fix:
tracopt/ticket/htdocs/ticketclone.coffee
'#ticket .description .searchable').before(clone)