Template talk:PermissionTicket/Archive/2012

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

related discussion

At the noticeboard is a discussion to remove the link and notice to contact somebody directly: Commons:OTRS/Noticeboard#PermissionOTRS. mabdul 17:54, 9 January 2012 (UTC)

Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. whym (talk) 12:31, 10 September 2021 (UTC)

Template is not working correctly?

Is it just me or does {{PermissionOTRS}} not send the files to Category:Items missing OTRS ticket ID? --MGA73 (talk) 12:50, 17 March 2012 (UTC)

Fixed -- Rillke(q?) 21:11, 11 September 2012 (UTC)
There are now 354 files in that category. I've already fixed some. There are several cases like this one where parameter 1 is the URL instead of the ID. It would be got if a bot could fix these cases. --Leyo 20:58, 14 September 2012 (UTC)
This should be even doable with VisualFileChange, option custom replace. -- Rillke(q?) 21:05, 14 September 2012 (UTC)
I might try it, but I am unsure if e.g. replacing https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketID=3538172 by id=3538172 would yield a correct link, since I cannot prove it. --Leyo 21:16, 14 September 2012 (UTC)
Hmm. The OTRS seems like confusing people with their ticket and id usage. Now they point to ticket, even if id= was used in the template. I marked those what were used completely without reference as |missingID=true so it is easy to filter them (either out of that category or into a new category or both) by editing the template. About 20 of the remaining ones in the category had some parameters but their format was not recognized by my regexps. -- Rillke(q?) 21:57, 14 September 2012 (UTC)
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. whym (talk) 12:31, 10 September 2021 (UTC)

Edit request

{{Edit request}}

There is extra linebreak due to the debug if expression at the end being on its own line; this results in an extra paragraph after the box when the template is used. Here's requesting that the linebreak be moved into the if expression. For the sake of avoiding any potential confusion, I have copied the entirety of the template source and made the change as follows:


Source
{{Autotranslate
|1=
{{ #if: {{{ticket|}}} 
  | {{{ticket}}}
  | {{ #if: {{{id|}}}
    | https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketNumber={{{id}}}
    | {{ #if: {{{freeform|}}}
      | {{{freeform}}}
      | {{ #if: {{{1|}}}
        | {{#ifeq:{{#expr:{{{1}}}> 1980000000000000 and {{{1}}}<3000000000000000}}|1
          | https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketNumber={{{1}}}
          | {{ #if: {{{2|}}}
            | {{#ifeq:{{#expr:{{{2}}}>1980000000000000 and {{{2}}}<3000000000000000}}|1
            | https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketNumber={{{2}}}
            | {{{1}}}{{#if: {{{2|}}}|{{!}}{{{2}}}}}{{#if: {{{3|}}}|{{!}}{{{3}}}}}{{#if: {{{4|}}}|{{!}}{{{4}}}}}{{#if: {{{5|}}}|{{!}}{{{5}}}}}{{#if: {{{6|}}}|{{!}}{{{6}}}}}{{#if: {{{7|}}}|{{!}}{{{7}}}}}{{#if: {{{8|}}}|{{!}}{{{8}}}}}{{#if: {{{9|}}}|{{!}}{{{9}}}}}
              | <span style="color: red; font-weight: bold; font-style: italic"><template error: no id or ticket is specified></span>
            }}
          }}
        }}
      }}
    }}
  }}
}}
|2=
{{ #if: {{{ticket|}}} 
  | 
  | {{ #if: {{{id|}}}
    | {{{id}}}
    | {{ #if: {{{freeform|}}}
      | 
      | {{ #if: {{{1|}}}
        | {{#ifeq:{{#expr:{{{1}}}>1980000000000000 and {{{1}}}<3000000000000000}}|1
          | {{{1}}}
          | {{ #if: {{{2|}}}
            | {{#ifeq:{{#expr:{{{2}}}>1980000000000000 and {{{2}}}<3000000000000000}}|1
            | {{{2}}}
            | 
            }}
          }}
        }}
      }}
    }}
  }}
}}
|base=PermissionOTRS
}}
{{ #if: {{{ticket|}}} 
  | {{{category|[[Category:Items with OTRS permission confirmed]]}}}
  | {{ #if: {{{id|}}}
    | {{{category|[[Category:Items with OTRS permission confirmed]]}}}
    | {{ #if: {{{freeform|}}}
      | {{{category|[[Category:Items with freeform OTRS permission confirmed|{{PAGENAME}}]]}}}
      | {{ #if: {{{1|}}}
        | {{#ifeq:{{#expr:{{{1}}}>1980000000000000 and {{{1}}}<3000000000000000}}|1
          | {{{category|[[Category:Items with OTRS permission confirmed]]}}}
          | {{ #if: {{{2|}}}
            | {{#ifeq:{{#expr:{{{2}}}>1980000000000000 and {{{2}}}<3000000000000000}}|1
            | {{{category|[[Category:Items with OTRS permission confirmed]]}}}
              | 
              {{ #if: {{{nocat|}}}
                |
                |<includeonly>{{{category|[[Category:Items missing OTRS ticket ID]]}}}{{gibox|text='''Warning:''' This file is missing essential information needed to confirm validity of the OTRS ticket.|type=issue}}</includeonly>
              }}
            }}
          }}
        }}
      }}
    }}
  }}
}}{{ #if: {{{debug|}}}|
<small>Template PermissionOTRS was called with the following parameters:{{{1}}}{{!}}{{{2}}}{{!}}id={{{id}}}{{!}}ticket={{{ticket}}}{{!}}freeform={{{freeform}}}{{!}}debug={{{debug}}}</small>}}{{ #if:{{{category|}}}{{{nocat|}}}{{{freeform|}}}|{{DebugTag}} }}<noinclude>

{{documentation}}
</noinclude>

Thanks. -— Isarra 17:11, 13 August 2012 (UTC)

✓ Snipe! Blurpeace 17:26, 13 August 2012 (UTC)
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. whym (talk) 12:31, 10 September 2021 (UTC)

Update required to use the interwiki mapped shortcut

Looks to be about time that we change the notation of this template to utilise the interwiki mapped shortcut [[ticket:ddddddddddd]] rather than the more complex extended form on show.  — billinghurst sDrewth 09:34, 18 November 2012 (UTC)

This template handles both calls like {{PermissionOTRS|ticket=https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketID=######}} and more standard {{PermissionOTRS|id=################}}. Right now both are handled by the same code and that can not be done by [[ticket:ddddddddddd]]. So for simplicity sake the current version is better. --Jarekt (talk) 17:52, 18 February 2013 (UTC)
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. whym (talk) 12:31, 10 September 2021 (UTC)