• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tylernathanreed / jira-client-php / 13678007438

05 Mar 2025 02:15PM UTC coverage: 2.081% (+0.01%) from 2.067%
13678007438

push

github

tylernathanreed
Merge branch 'master' of github.com:tylernathanreed/jira-client-php

141 of 6775 relevant lines covered (2.08%)

0.03 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Operations/ScreenTabs.php
1
<?php
2

3
namespace Jira\Client\Operations;
4

5
use Jira\Client\Client;
6
use Jira\Client\Schema;
7

8
/** @phpstan-require-extends Client */
9
trait ScreenTabs
10
{
11
    /**
12
     * Returns the list of tabs for a bulk of screens
13
     * 
14
     * **"Permissions" required:**
15
     * 
16
     *  - *Administer Jira* "global permission".
17
     * 
18
     * @link https://confluence.atlassian.com/x/x4dKLg
19
     * 
20
     * @param ?list<int> $screenId The list of screen IDs.
21
     *                             To include multiple screen IDs, provide an ampersand-separated list.
22
     *                             For example, `screenId=10000&screenId=10001`.
23
     * @param ?list<int> $tabId The list of tab IDs.
24
     *                          To include multiple tab IDs, provide an ampersand-separated list.
25
     *                          For example, `tabId=10000&tabId=10001`.
26
     * @param int $startAt The index of the first item to return in a page of results (page offset).
27
     * @param int $maxResult The maximum number of items to return per page.
28
     *                       The maximum number is 100,
29
     */
30
    public function getBulkScreenTabs(
×
31
        ?array $screenId = null,
32
        ?array $tabId = null,
33
        ?int $startAt = 0,
34
        ?int $maxResult = 100,
35
    ): true {
36
        return $this->call(
×
37
            uri: '/rest/api/3/screens/tabs',
×
38
            method: 'get',
×
39
            query: compact('screenId', 'tabId', 'startAt', 'maxResult'),
×
40
            success: 200,
×
41
            schema: true,
×
42
        );
×
43
    }
44

45
    /**
46
     * Returns the list of tabs for a screen
47
     * 
48
     * **"Permissions" required:**
49
     * 
50
     *  - *Administer Jira* "global permission"
51
     *  - *Administer projects* "project permission" when the project key is specified, providing that the screen is associated with the project through a Screen Scheme and Issue Type Screen Scheme.
52
     * 
53
     * @link https://confluence.atlassian.com/x/x4dKLg
54
     * @link https://confluence.atlassian.com/x/yodKLg
55
     * 
56
     * @param int $screenId The ID of the screen.
57
     * @param string $projectKey The key of the project.
58
     * 
59
     * @return list<Schema\ScreenableTab>
60
     */
61
    public function getAllScreenTabs(
×
62
        int $screenId,
63
        ?string $projectKey = null,
64
    ): array {
65
        return $this->call(
×
66
            uri: '/rest/api/3/screens/{screenId}/tabs',
×
67
            method: 'get',
×
68
            query: compact('projectKey'),
×
69
            path: compact('screenId'),
×
70
            success: 200,
×
71
            schema: [Schema\ScreenableTab::class],
×
72
        );
×
73
    }
74

75
    /**
76
     * Creates a tab for a screen
77
     * 
78
     * **"Permissions" required:** *Administer Jira* "global permission".
79
     * 
80
     * @link https://confluence.atlassian.com/x/x4dKLg
81
     * 
82
     * @param int $screenId The ID of the screen.
83
     */
84
    public function addScreenTab(
×
85
        Schema\ScreenableTab $request,
86
        int $screenId,
87
    ): Schema\ScreenableTab {
88
        return $this->call(
×
89
            uri: '/rest/api/3/screens/{screenId}/tabs',
×
90
            method: 'post',
×
91
            body: $request,
×
92
            path: compact('screenId'),
×
93
            success: 200,
×
94
            schema: Schema\ScreenableTab::class,
×
95
        );
×
96
    }
97

98
    /**
99
     * Updates the name of a screen tab
100
     * 
101
     * **"Permissions" required:** *Administer Jira* "global permission".
102
     * 
103
     * @link https://confluence.atlassian.com/x/x4dKLg
104
     * 
105
     * @param int $screenId The ID of the screen.
106
     * @param int $tabId The ID of the screen tab.
107
     */
108
    public function renameScreenTab(
×
109
        Schema\ScreenableTab $request,
110
        int $screenId,
111
        int $tabId,
112
    ): Schema\ScreenableTab {
113
        return $this->call(
×
114
            uri: '/rest/api/3/screens/{screenId}/tabs/{tabId}',
×
115
            method: 'put',
×
116
            body: $request,
×
117
            path: compact('screenId', 'tabId'),
×
118
            success: 200,
×
119
            schema: Schema\ScreenableTab::class,
×
120
        );
×
121
    }
122

123
    /**
124
     * Deletes a screen tab
125
     * 
126
     * **"Permissions" required:** *Administer Jira* "global permission".
127
     * 
128
     * @link https://confluence.atlassian.com/x/x4dKLg
129
     * 
130
     * @param int $screenId The ID of the screen.
131
     * @param int $tabId The ID of the screen tab.
132
     */
133
    public function deleteScreenTab(
×
134
        int $screenId,
135
        int $tabId,
136
    ): true {
137
        return $this->call(
×
138
            uri: '/rest/api/3/screens/{screenId}/tabs/{tabId}',
×
139
            method: 'delete',
×
140
            path: compact('screenId', 'tabId'),
×
141
            success: 204,
×
142
            schema: true,
×
143
        );
×
144
    }
145

146
    /**
147
     * Moves a screen tab
148
     * 
149
     * **"Permissions" required:** *Administer Jira* "global permission".
150
     * 
151
     * @link https://confluence.atlassian.com/x/x4dKLg
152
     * 
153
     * @param int $screenId The ID of the screen.
154
     * @param int $tabId The ID of the screen tab.
155
     * @param int $pos The position of tab.
156
     *                 The base index is 0.
157
     */
158
    public function moveScreenTab(
×
159
        int $screenId,
160
        int $tabId,
161
        int $pos,
162
    ): true {
163
        return $this->call(
×
164
            uri: '/rest/api/3/screens/{screenId}/tabs/{tabId}/move/{pos}',
×
165
            method: 'post',
×
166
            path: compact('screenId', 'tabId', 'pos'),
×
167
            success: 204,
×
168
            schema: true,
×
169
        );
×
170
    }
171
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc