Issue 68223

Summary: Allow to use templates with the same title in the same group.
Product: General Reporter: mikhail.voytenko
Component: codeAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: cno, issues, tim
Version: 680m177Keywords: usability
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
doc with screenshots and so none

Description mikhail.voytenko 2006-08-07 13:21:08 UTC
Currently it is not possible to use templates that have the same title in the
same group.
It can be implemented in the template component, but the problem is that other
features have problem with this, because the template is reffered by the title
currently ( for example in the document create by template ). Probably the title
should not be used any more as a reference to a template.
Comment 1 Mathias_Bauer 2007-12-04 16:17:32 UTC
according to release status meeting -> target 3.x
Comment 2 cno 2008-02-05 08:30:02 UTC
Hi mav,
What is exactly meant?
a. Allow two templates 'xyz' in one category? 
Or
b. Allow template 'xyz' in category 'xyz'?
What should be the use of a ?
Thanks,
Cor
Comment 3 mikhail.voytenko 2008-02-05 09:08:40 UTC
Allow two templates 'xyz' in one category.
Comment 4 cno 2008-02-05 09:16:29 UTC
Thanks,
And what, from user perspective, should be the advantage to choose between 'xyz'
and 'xyz' in one category ??
Comment 5 mikhail.voytenko 2008-02-05 09:41:53 UTC
It is more to make the API consistent. In the current implementation one of the
templates will be visible and one not. That is not nice.

Comment 6 cno 2008-02-05 09:48:05 UTC
Thanks. I've some questions /remarks related to this. (problems with 'xyz1'-
templates appearing from ??, and such)
But am not sure if this issue is the right place for them.
Comment 7 mikhail.voytenko 2008-02-05 09:54:32 UTC
Sorry, I do not understand what do you mean by your last comment. Which problem
do you mean.
Comment 8 cno 2008-02-05 11:26:28 UTC
Well, difficult to track, otherwise I would have created an issue already.
But thanks for asking, now I'm forced to figure it out :-)
I think is related to issue #16172 that I found this morning.
Also I think it must have relation with issue #74389.

1- start new Writer document and add some text
2- choose File|Templates|Save
3- select a name in the list Categories (left)
4- enter name 'tstMysteryTemplate' in box 'New template' and click OK
5- close file

6- Ctrl-Shft-N
7- Choose  tstMysteryTemplate and click Open
8- Make some changes

9- choose File|Templates|Save
10- select 'tstMysteryTemplate' in the list temples left, now the name appears
in the box 'New template'
11- click OK and choose Yes to replace.


12- Ctrl-Shft-N
13- You can see tstMysteryTemplate there. 
So far so good.

14- Now choose File|Template|Edit
15- You can see tstMysteryTemplate and tstMysteryTemplate1 there. 
Not as we expect.

16- Furthermore, if you do the same exercise, tstMysteryTemplate1 will be
replaced by tstMysteryTemplate2.

17- if you do the same exercise again, tstMysteryTemplate2 will be replaced by
tstMysteryTemplate1.

18- Just tried: doesn't matter if you start step 9 with a new document or a
document from an existing template (that is how I stumbled over the problem,
somewhere in the past, just because when there are quite some templates that you
have to re-organize, File|Template|Edit isn't always the logic way).

I'll attach a doc with screenshots
Comment 9 cno 2008-02-05 11:27:18 UTC
Created attachment 51375 [details]
doc with screenshots and so
Comment 10 cno 2008-02-05 11:37:10 UTC
Related question:
on /wiki/framework I do not find a pointer to rework of template management.
However, somewhere I've read that it is either on the way or in progress.
Any place to go for info reg. this? 
It might help me (and others) if we have questions about bugs or rfe's to see
what is planned and so. But maybe this question just comes to early ;-)

Thanks, Cor
Comment 11 mikhail.voytenko 2008-02-06 10:02:50 UTC
Sorry, I do not know anything about plans to "rework of template management". 
There are some bugs including this one that should be fixed, but as I have
already mentioned I have no idea about plans to do a global rework.

As for the scenario that you have described, the number in the template name is
acceptable. As I have already written in the comment to the issue 74389,
File/Templates/Edit works with file system and not with the template hierarchy (
template hierarchy uses title of the template instead of file name ). I agree
that it is a good idea to let it work with the template hierarchy, but it would
be a new feature as I have already mentioned in the related bug.

The original template stays locked while editing, so when you try to store as
the same template the file can not be removed. At the end there are two template
files. This scenario looks to be a duplicate to the issue 16712, could you
please adjust the issue with the scenario you have mentioned above.
Comment 12 cno 2008-02-06 10:32:52 UTC
Reg. the plans: maybe I misinterpreted a message about reworking the dialogs.
Apologies.

I try to understand yet what the difference between working with the file system
versus the template hierarchy does in this subject.
Summary of my comment yesterday: Save file as existing 'MyTemplate' and I end up
with bóth 'MyTemplate' and 'MyTemplate1'
See screenshots in attachment.

Now trying in 2.4-dev (m6 already) I cannot reproduce. It only results in
'MyTemplate1' there.
I still cán reproduce in 2.3.1. So probably a specific problem in 2.3.1 or my
(legacy) user directory tree.

I'll add my comments to issue 16712. 

One more question about this issue:
two names 'xyz' in one category. How must I understand that in the file system?
Comment 13 mikhail.voytenko 2008-02-06 10:42:00 UTC
Glad to hear that the additional file does not appear in OOo2.4. Then it makes
no sense to update the issue 16712, the mentioned by you scenario seems not to
be affected any more by the problem.

For example, two template files that have names "xyz1" and "xyz2" are placed in
the same directory. This directory is in template path, so building a template
hierarchy will get the templates from this directory as well. If both templates
have the same title "Template xyz", they are affected by this issue, since the
template title is used in the template hierarchy instead of file name. 
Comment 14 cno 2008-02-06 10:57:37 UTC
Thanks for the explanation. First I didn't realise it had to do with the
difference between title and file name.
Comments to issue 16712 already done ;-)
Comment 15 eric.savary 2009-06-21 11:08:50 UTC
*** Issue 102756 has been marked as a duplicate of this issue. ***
Comment 16 cno 2009-06-24 07:55:05 UTC
As explained in issue 102756, and experienced by myself and relatives in the
mean time, it also is a usability problem:
- Edit an existing "templateA"
- Save as "templateB"
 > won't be shown in File|New|Template
 (unless, as we know from this issue, the Title of the document is changed
How to explain this to users :-)
Comment 17 Marcus 2017-05-20 10:47:51 UTC
Reset assigne to the default "issues@openoffice.apache.org".