Template talk:OTRS

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

On huwiki this template is used in the form {{OTRS|id=ticket number}}. Any objections against changing the template to

{{#if:{{{2|}}}|{{PermissionOTRS|id={{{2|}}}}}|{{PermissionOTRS|id={{{id|{{{1|}}}}}}}}}}<includeonly>{{#if:{{{1|}}}{{{2|}}}{{{id|}}} | | [[Category:Items missing OTRS ticket ID]] }}</includeonly>

? --Tgr (talk) 21:02, 9 April 2010 (UTC)[reply]

Problem with files transferred from de.wikipedia[edit]

{{Editprotected}} There is a problem with Template:OTRS that occurs in many pages: If the ticket number is parameter 1, parameter 2 (usually the date or a user) is taken for the link. Hence, such links do not lead to the correct tickets. Examples: File:Benz-Motorspritze Typ 1 CS.jpg, File:Marbach-Stanzform.JPG, File:Uwe Böden-1 retouched.jpg. The following code provided by (that is supposed to replace the current code from the beginning until <noinclude>) will address the issue:

{{PermissionOTRS
|id= {{#if:{{{id|}}}
 | {{{id}}}
 | {{#if:{{{1|}}}
  | {{#if:{{{2|}}}
   | <!--if both → like in de.wikipedia--> {{#iferror: {{#expr: {{{1}}}}}
    | {{{2}}}
    | {{#iferror: {{#expr: {{{2}}}}}
     | {{{1}}}
     | {{#ifexpr: ({{{1}}}) < ({{{2}}})
      | {{{2}}}
      | {{{1}}}
     }}
    }}
   }}
   | {{{1}}}
  }}
  | {{{2|}}}
 }}
}}
}}

--Leyo 00:24, 22 February 2012 (UTC)[reply]

✓ Done by User:Leyo on 7 March. Rd232 (talk) 12:30, 25 March 2012 (UTC)[reply]

Merge all OTRS to one[edit]

Why do we have {{OTRS}} and {{PermissionOTRS}}? Why not merge these (and others if there is more) to one template? --MGA73 (talk) 12:41, 17 March 2012 (UTC)[reply]

They more or less are merged: OTRS transcludes PermissionOTRS, in a way that allows some people to use the template in a form they're more familiar with. Rd232 (talk) 12:31, 25 March 2012 (UTC)[reply]

Ticket=?[edit]

Can support for |ticket= be added, please? – Philosopher Let us reason together. 23:04, 1 December 2012 (UTC)[reply]

Use {{PermissionOTRS}} directly. --Jarekt (talk) 04:04, 4 March 2013 (UTC)[reply]

Merge all OTRS to one[edit]

I think we can now safely, implement {{OTRS}} as redirect to {{PermissionOTRS}}, since no current files using the template use parameter #2, see Category:OTRS templates with 2 or more unnamed parameters. We should encourage the use of named parameters so there is no ambiguity. If in the future we see people using OTRS with parameter 2 than we can always add support for it to {{PermissionOTRS}} (although I would prefer to avoid that). --Jarekt (talk) 04:03, 4 March 2013 (UTC)[reply]

✓ Done I added support of parameter 2 to {{PermissionOTRS}}. So now there is no difference between the two. --Jarekt (talk) 21:59, 6 March 2013 (UTC)[reply]