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

tylernathanreed / jira-client-php / 13857440588

14 Mar 2025 01:18PM UTC coverage: 70.825% (-0.06%) from 70.885%
13857440588

push

github

tylernathanreed
~ Fixed nested objects in test examples

9 of 9 new or added lines in 1 file covered. (100.0%)

524 existing lines in 407 files now uncovered.

4826 of 6814 relevant lines covered (70.82%)

8.59 hits per line

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

48.57
/src/Operations/ScreenTabFields.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 ScreenTabFields
10
{
11
    /**
12
     * Returns all fields for a screen tab
13
     * 
14
     * **"Permissions" required:**
15
     * 
16
     *  - *Administer Jira* "global permission"
17
     *  - *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.
18
     * 
19
     * @link https://confluence.atlassian.com/x/x4dKLg
20
     * @link https://confluence.atlassian.com/x/yodKLg
21
     * 
22
     * @param int $screenId The ID of the screen.
23
     * @param int $tabId The ID of the screen tab.
24
     * @param string $projectKey The key of the project.
25
     * 
26
     * @return list<Schema\ScreenableField>
27
     */
UNCOV
28
    public function getAllScreenTabFields(
×
29
        int $screenId,
30
        int $tabId,
31
        ?string $projectKey = null,
32
    ): array {
33
        return $this->call(
×
34
            uri: '/rest/api/3/screens/{screenId}/tabs/{tabId}/fields',
×
35
            method: 'get',
×
36
            query: compact('projectKey'),
×
37
            path: compact('screenId', 'tabId'),
×
38
            success: 200,
×
39
            schema: [Schema\ScreenableField::class],
×
40
        );
×
41
    }
42

43
    /**
44
     * Adds a field to a screen tab
45
     * 
46
     * **"Permissions" required:** *Administer Jira* "global permission".
47
     * 
48
     * @link https://confluence.atlassian.com/x/x4dKLg
49
     * 
50
     * @param int $screenId The ID of the screen.
51
     * @param int $tabId The ID of the screen tab.
52
     */
53
    public function addScreenTabField(
1✔
54
        Schema\AddFieldBean $request,
55
        int $screenId,
56
        int $tabId,
57
    ): Schema\ScreenableField {
58
        return $this->call(
1✔
59
            uri: '/rest/api/3/screens/{screenId}/tabs/{tabId}/fields',
1✔
60
            method: 'post',
1✔
61
            body: $request,
1✔
62
            path: compact('screenId', 'tabId'),
1✔
63
            success: 200,
1✔
64
            schema: Schema\ScreenableField::class,
1✔
65
        );
1✔
66
    }
67

68
    /**
69
     * Removes a field from a screen tab
70
     * 
71
     * **"Permissions" required:** *Administer Jira* "global permission".
72
     * 
73
     * @link https://confluence.atlassian.com/x/x4dKLg
74
     * 
75
     * @param int $screenId The ID of the screen.
76
     * @param int $tabId The ID of the screen tab.
77
     * @param string $id The ID of the field.
78
     */
79
    public function removeScreenTabField(
1✔
80
        int $screenId,
81
        int $tabId,
82
        string $id,
83
    ): true {
84
        return $this->call(
1✔
85
            uri: '/rest/api/3/screens/{screenId}/tabs/{tabId}/fields/{id}',
1✔
86
            method: 'delete',
1✔
87
            path: compact('screenId', 'tabId', 'id'),
1✔
88
            success: 204,
1✔
89
            schema: true,
1✔
90
        );
1✔
91
    }
92

93
    /**
94
     * Moves a screen tab field
95
     * 
96
     * If `after` and `position` are provided in the request, `position` is ignored
97
     * 
98
     * **"Permissions" required:** *Administer Jira* "global permission".
99
     * 
100
     * @link https://confluence.atlassian.com/x/x4dKLg
101
     * 
102
     * @param int $screenId The ID of the screen.
103
     * @param int $tabId The ID of the screen tab.
104
     * @param string $id The ID of the field.
105
     */
UNCOV
106
    public function moveScreenTabField(
×
107
        Schema\MoveFieldBean $request,
108
        int $screenId,
109
        int $tabId,
110
        string $id,
111
    ): true {
112
        return $this->call(
×
113
            uri: '/rest/api/3/screens/{screenId}/tabs/{tabId}/fields/{id}/move',
×
114
            method: 'post',
×
115
            body: $request,
×
116
            path: compact('screenId', 'tabId', 'id'),
×
117
            success: 204,
×
118
            schema: true,
×
119
        );
×
120
    }
121
}
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