Closed sdenef-adeo closed 2 years ago
Hi @sdenef-adeo , I guess I thought that since this command can only render one schedule at a time, nobody would need the id and the name because they would already have known it. But I sort of get what you are trying to do. How about if i add those values as extended columns that will be shown if you give the -x
flag?
Make them available through the -x
flag would be enough for my use case.
Thanks Martin.
Note about my use case. As a PagerDuty admin I want to inform all people in my company about:
who will be on call for the next public holiday
NB: will be Thursday 26th of May for France
With this info, they're able to update their schedule if needed. eg: Alice should be oncall from 9:00 AM to 18:00 AM, but as it's a public holiday her team know it's Bob turn to be oncall all the day long.
I output the results as CSV to store them in a database table. Having the ID, I can join it with the schedule, the EP, the services and the teams data to provide to my users full data. They may filter on services to exclude those for DEV environments or whatever they need.
Regards
Hi @sdenef-adeo it makes good sense what you are trying to do. I have added those columns to the extended output in schedule:render in 0.1.3, just pushed. If you have a self-updatable installation of pd, you can do pd update rc
to get it; if you installed using npm, something like npm i -g pagerduty-cli@0.1.3
should do the trick. I will keep this issue open until i know this solves the issue for you and i promote 0.1.3+ to a stable update channel. Let me know... Thank you!
Hi Martin, I tested and it works well. Thank you.
Awesome. I will close this issue now. Thanks for reporting it!
Hello,
I need to use
schedule:render
then use the result to join escalation policies, teams, or whatever. I faced an issue because I'm not able to have the schedule ID and/or name. As far as I understand, the schedule:render command restrict data to theschedule.final_schedule.rendered_schedule_entries
part. I didn't find any way to add schedule ID and name to the ouput.Any idea? Or is it a feature request to implement?
Example:
pd schedule render -i P999999 --since=$PD_SINCE --until=$PD_UNTIL --sort=start --output=csv --delimiter=,
Output:Expected:
Regards, Sébastien