I'm using CA SDM 14.1.02 and I have a question: ¿How can I to set so that the Analyst level 1, only can to close incidents from any state, and be the only one to see the closed state from any previous state?
This sounds like a bad idea if you consider the ITIL definitions and way of doing things but I'll set that aside and try to help you out. There's more than one way to achieve this but the easiest might be to do it with data partitions. I don't have a r14 system available but here's how I'd attempt this (let us know how it goes):
code <> 'CL'
status <> 'CL'
And that's it.
You could also do this on the request_status_change.htmpl form and insert some logic based on the current role, but in my opinion going through the data partitions might be simpler.
Hi Jussi Valkonen,
Thank you very much for interesting in my question. Your solution is good, but does not help me, because the requirement is that the others levels can see the closed state from confirming state, but not from the other states. And adding the constraint that you propouse, limit the visualitation the closed status in all moment.
Yep, if you need to conditionally see the status then data partitions are not the way to do it, I just didn't assume anything apart from what you initially said. For the conditionality the best way is indeed what birolturker.kara suggested and improving Chi_Chen's suggestion to use code instead of id for improved readability:
<PDM_IF "$SESSION.ROLE_ID" == 10008> <PDM_MACRO name=dtlDropdown hdr="Status" attr=status factory=crs_cr ><PDM_ELSE> <PDM_MACRO name=dtlDropdown hdr="Status" attr=status factory=crs_cr whereclause="code<>'CL'"></PDM_IF>
For better maintainability you'll want to place this inside a separate htmpl file and then include that file on detail_cr.htmpl and request_status_change.htmpl where you normally have the status dropdown. This way you can later on override the definition for a specific form group while the rest fall back to the default way defined this way. This also works well together with the global status transitions so overall you should have a very flexible and easily maintainable solution if you go this way.
For limiting the closure:
Since 12.xx something (can't remember if 12.7 or 12.9 introduce it) you can use status transition to restrict what status is available from other status and you can add a condition there
so you can create a condition macro that will check for the current role of the logged in user and only allow the transition to close if this is equal to Analyst Level 1.
Hope this help.
Thank you very much for interesting in my question.
I have been trying adding in the Activities Association, a association that evaluetes the current role of the logged in user, and so create the condition macro, but I have not been able.
I appreciate your help in creating this Activity Association.
I can help you to create that condition macro but why will you want an activity association.
This macro is to be used in your status transition.
Can you help me to create that condition macro please? I was thinking in activity association to evaluate in the macro, the role of the analyst who created the ticket and thus know if an analyst at Level 1.
I appreciate all your help.
I think you can try to do this using Tuker's suggestion. For
<PDM_IF "$SESSION.ROLE_ID" == 10008>
<PDM_MACRO name=dtlDropdown hdr="Status" attr=status factory=crs_cr >
<PDM_MACRO name=dtlDropdown hdr="Status" attr=status factory=crs_cr whereclause="id<>5201">
here we assume 10008 is the id of "level 1 analyst" role and
5201 is the id for "closed" staus.
Thank very much, I served your help!
You can take actions for below statements
"10008" is Level 1 Analyst Session Role Id
// take actions for Level 1 Analyst
//take actions for other role users