Notifications

1199 views

Description

If you have a large number of custom states for task and extensions of task, the following issues occur when you try to construct a custom filter based on the state:

1. The list of states appears random, so it can be difficult to find your choice.
2. The list is incomplete and your choice may not be available for selection.

Group the list of all tasks by state. If your desired state did not appear as a choice when you were trying to create the filter, it will not appear as a group in this list either.

If you filter on a particular task type and then group by state, all of the desired states appear as grouping values, including the ones that did not display with filtering or grouping on the entire list.

Steps to Reproduce

 

 

  1. Go to your choice list and delete all existing choices for the element state where the name is one of the following: (change_phase, change_request, change_request_imac, change_task, chat_queue_entry, incident, kb_submission, planned_task, pm_project, pm_project_task, problem, problem_task, release_phase, release_task, rm_defect, rm_doc, rm_enhancement, rm_epic, rm_feature, rm_product, rm_release, rm_release_phase, rm_release_scrum, rm_release_sdlc, rm_scrum_task, rm_sprint, rm_story, rm_task, rm_test, sc_req_item, sc_request, sc_task, sysapproval_group, task,ticket).
  2. Import the attached XML file of sys_choice records.
  3. Navigate to Scripts > Background and paste the JavaScript in the attached PRB584352 Data Builder JS.txt file, and click the Run Script button.
  4. Navigate to task.list.
  5. Use the filter wizard and try to specify [State] is [Requestor Production Verification].
    It is not an available choice for State, even though it is a valid state for Enhancements and Defects, and there is one of each of these present.
  6. Group this task list by State.
    Note that you will not see Requestor Production Verification in your groups in your list.
  7. Filter by [Task Type] is [Enhancement] or [Task Type] is [Defect].
    Note that you will have a group for Requestor Production Verification with two records in it (1 enhancement, 1 defect).

Workaround

The filter below can be used to retrieve all the available [sys_choice] values stored in the instance for task related tables:

/sys_choice_list.do?sysparm_query=nameINtask%2Cincident%2Cchange_request%2Cproblem%2Csc_request%2Csc_req_item

SN Administrators should monitor the existing values before initiating any maintenance to state values.

The order of the state fields that show up in the filter may appear random, but they actually follow these rules:

  1. All the sys_choice options for the base table come first.
  2. It will not add duplicate values for the sys_choice.value field.
  3. Choices are ordered by sequence, then by label.
  4. Only choices where inactive = false are included.
  5. After all the base tables are added, all the options for the extended tables are added.
  6. Extended tables are added one table at a time.
  7. Extended tables follow all the same rules as (2 through 4).

Related Problem: PRB584352

Seen In

Berlin Hot Fix 4
Berlin Hot Fix 8
Berlin Patch 7 Hot Fix 1
Calgary Patch 2 Hot Fix 5
Calgary Patch 3 Hot Fix 1
Calgary Patch 4
Dublin EA 8 Hot Fix 1
Dublin Patch 1
Eureka Patch 2
Fuji Patch 11
Fuji Patch 3
Fuji Patch 5
Geneva Patch 6

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2017-11-14 16:09:32
Published:2017-06-15
PRB584352 Data Builder JS.txtsys_choice.xml