Skip to content

Commit 2c4411b

Browse files
authored
Urgency is set to Null when opening story (#4953)
1 parent a41b992 commit 2c4411b

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

e2e/client/playwright/authoring.spec.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ import {test, expect} from '@playwright/test';
22
import {Monitoring} from './page-object-models/monitoring';
33
import {restoreDatabaseSnapshot, s} from './utils';
44

5+
const defaultPriorityValue = '6';
6+
const defaultUrgencyValue = '3';
7+
58
test('applying "populate abstract" macro', async ({page}) => {
69
await restoreDatabaseSnapshot();
710

@@ -149,12 +152,12 @@ test('edit urgency and priority', async ({page}) => {
149152

150153
const priority = page.locator(s('authoring-field=priority'));
151154

152-
await priority.getByRole('button', {name: 'None'}).click();
155+
await priority.getByRole('button', {name: defaultPriorityValue}).click();
153156
await priority.getByRole('button', {name: '3'}).click();
154157

155158
const urgency = page.locator(s('authoring-field=urgency'));
156159

157-
await urgency.getByRole('button', {name: 'None'}).click();
160+
await urgency.getByRole('button', {name: defaultUrgencyValue}).click();
158161
await urgency.getByRole('button', {name: '5'}).click();
159162

160163
await page.locator(s('save')).click();

scripts/apps/authoring/metadata/views/metadata-dropdown.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
<b class="dropdown__caret"></b>
2626
</button>
2727
<button ng-disabled="disabled" class="dropdown__toggle line-input" tabindex="{{tabindex}}" dropdown__toggle ng-if="icon">
28-
<span class="{{icon}}-{{selected.qcode}}"
29-
ng-style="{backgroundColor: selected.color}">{{ selected.short || selected.name || 0 }}</span>
30-
{{ getLocaleName(selected, item) }} <b class="dropdown__caret"></b>
28+
<span class="{{icon}}-{{item[field]}}"
29+
ng-style="{backgroundColor: values[item[field]].color}">{{ values[item[field]].short || item[field] || 0 }}</span>
30+
{{ getLocaleName(values[item[field]], item) }} <b class="dropdown__caret"></b>
3131
</button>
3232
<ul class="dropdown__menu">
3333
<li ng-if="label"><div class="dropdown__menu-label">{{ label }}</div></li>

0 commit comments

Comments
 (0)