Warning |
---|
The availability of the users personal data may be impacted by the recent changes by Atlassian in order to meet GDPR compliance. See the following for more information: |
Info |
---|
|
This routine is available starting with katl-commons 2.0.5 for Jira 5.x or katl-commons 1.1.12 for Jira 4.3.x/ 4.4.x.
This routine is available for Jira server and cloud deployment options. Table plus |
---|
applyColStyleToCell | true |
---|
heading | 0 |
---|
columnTypes | s,s,s,s |
---|
multiple | false |
---|
columnAttributes | style="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold, |
---|
enableSorting | false |
---|
|
Syntax | runAs(user) | Package | | Alias | | Pkg Usage | | |
Description
Excerpt |
---|
|
Assumes a user when running a script. |
Assumes a user when running a script.
Parameters
Table plus |
---|
applyColStyleToCell | true |
---|
columnTypes | s,s,s,s |
---|
heading | 0 |
---|
multiple | false |
---|
enableSorting | false |
---|
|
Parameter name | Type | Required | Description |
---|
User | String | Yes | |
...
...
Return
...
Type
None
Example
Code Block |
---|
runAs("user1");
print(currentDate());
print(currentUser());
runAs("admin");
|
The output in the console will console will be following:
2012 -06 -20 13: 39: 31, 629 pool -5 -thread -2 INFO user1 819x261x1 1k7wpbj 127.0.0.1 /rest/keplerrominfo/jjupin/latest/rungadget/run[commons.sil.routines.StringPrintRoutine] 2012-06-20 13:39:31
2012-06-20 13:39:31, 629 pool-5-thread
...
2 INFO user1 819x261x1 1k7wpbj 127.0.0.1 /rest/keplerrominfo/jjupin/latest/rungadget/run[commons.sil.routines.StringPrintRoutine] user1
...
...
The look-up is first made after the userkey, then after the username. |
See also
Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 25 |
---|
showSpace | false |
---|
cql | label = "jira_contextuser_routine" and space = currentSpace ( ) |
---|
labels | jiraarray_context_routineroutines |
---|
|